Makefile: add more dependencies.
This commit is contained in:
parent
fec786f6c1
commit
b4242f866d
1 changed files with 4 additions and 8 deletions
12
Makefile
12
Makefile
|
@ -1,30 +1,26 @@
|
||||||
PROGRAMS=justnukeit
|
PROGRAMS=justnukeit
|
||||||
|
|
||||||
justnukeit_OBJS=Position.cmx Maze.cmx Player.cmx main.cmx
|
justnukeit_OBJS=Position.cmx Maze.cmx Player.cmx main.cmx
|
||||||
justnukeit_LIBS=graphics.cmxa
|
justnukeit_LIBS=graphics.cmxa unix.cmxa threads.cmxa
|
||||||
|
|
||||||
MODULES=$(patsubst %.mli,%,$(wildcard *.mli)) $(patsubst %.ml,%,$(wildcard *.ml))
|
MODULES=$(patsubst %.mli,%,$(wildcard *.mli)) $(patsubst %.ml,%,$(wildcard *.ml))
|
||||||
|
|
||||||
CMI=$(patsubst %.ml,%.cmi,$(MODULES:=.ml))
|
CMI=$(patsubst %.ml,%.cmi,$(MODULES:=.ml))
|
||||||
CMO=$(patsubst %.ml,%.cmo,$(MODULES:=.ml))
|
CMO=$(patsubst %.ml,%.cmo,$(MODULES:=.ml))
|
||||||
CMX=$(patsubst %.ml,%.cmx,$(MODULES:=.ml))
|
CMX=$(patsubst %.ml,%.cmx,$(MODULES:=.ml))
|
||||||
#LIB=unix.cmxa str.cmxa graphics.cmxa
|
|
||||||
LIB=
|
LIB=
|
||||||
|
|
||||||
OCAMLDEP=ocamldep
|
OCAMLDEP=ocamldep
|
||||||
OCAMLOPT=ocamlopt
|
OCAMLOPT=ocamlopt
|
||||||
OCAMLC=ocamlc
|
OCAMLC=ocamlc
|
||||||
|
|
||||||
|
OPTS=-w A -g -thread
|
||||||
SOURCE=main.ml
|
|
||||||
|
|
||||||
OPTS=-w A -g
|
|
||||||
|
|
||||||
define PROGRAM_template
|
define PROGRAM_template
|
||||||
ALL_OBJS += $$($(1)_OBJS)
|
ALL_OBJS += $$($(1)_OBJS)
|
||||||
$(1): $$($(1)_OBJS)
|
$(1): $$($(1)_OBJS)
|
||||||
@echo -n -e "\x1B[31;1m"
|
@echo -n -e "\x1B[31;1m"
|
||||||
@echo "[O] $@"
|
@echo "[L] $@"
|
||||||
@echo -n -e "\x1B[0m"
|
@echo -n -e "\x1B[0m"
|
||||||
$(OCAMLOPT) $(OPTS) $($(1)_LIBS) $($(1)_OBJS) -o $(1)
|
$(OCAMLOPT) $(OPTS) $($(1)_LIBS) $($(1)_OBJS) -o $(1)
|
||||||
@echo ""
|
@echo ""
|
||||||
|
@ -48,7 +44,7 @@ all: $(PROGRAMS)
|
||||||
@echo -n -e "\x1B[31;1m"
|
@echo -n -e "\x1B[31;1m"
|
||||||
@echo "[C] $<"
|
@echo "[C] $<"
|
||||||
@echo -n -e "\x1B[0m"
|
@echo -n -e "\x1B[0m"
|
||||||
@$(OCAMLOPT) -i $<
|
@$(OCAMLOPT) $(OPTS) -i $<
|
||||||
@$(OCAMLOPT) $(OPTS) -c $<
|
@$(OCAMLOPT) $(OPTS) -c $<
|
||||||
@echo ""
|
@echo ""
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue