Makefile: Rewrite *_OBJS and *_LIBS without extensions.
This commit is contained in:
parent
3a5b584ff6
commit
a8f72d8c9d
1 changed files with 6 additions and 6 deletions
12
Makefile
12
Makefile
|
@ -1,8 +1,8 @@
|
||||||
PROGRAMS=justnukeit
|
PROGRAMS=justnukeit
|
||||||
|
|
||||||
justnukeit_OBJS=Position.cmx Maze.cmx Player.cmx main.cmx
|
justnukeit_OBJS=Position Maze Player main
|
||||||
justnukeit_INCS=sdl
|
justnukeit_INCS=sdl
|
||||||
justnukeit_LIBS=graphics.cmxa unix.cmxa threads.cmxa bigarray.cmxa sdl.cmxa
|
justnukeit_LIBS=graphics unix threads bigarray sdl sdlloader sdlttf
|
||||||
|
|
||||||
MODULES=$(patsubst %.mli,%,$(wildcard *.mli)) $(patsubst %.ml,%,$(wildcard *.ml))
|
MODULES=$(patsubst %.mli,%,$(wildcard *.mli)) $(patsubst %.ml,%,$(wildcard *.ml))
|
||||||
|
|
||||||
|
@ -17,12 +17,12 @@ OCAMLC=ocamlc
|
||||||
OPTS=-w A -g -thread -I +sdl -ccopt -L+sdl
|
OPTS=-w A -g -thread -I +sdl -ccopt -L+sdl
|
||||||
|
|
||||||
define PROGRAM_template
|
define PROGRAM_template
|
||||||
ALL_OBJS += $$($(1)_OBJS)
|
ALL_OBJS += $($(1)_OBJS)
|
||||||
$(1): $$($(1)_OBJS)
|
$(1): $$($(1)_OBJS:=.cmx)
|
||||||
@echo -n -e "\x1B[31;1m"
|
@echo -n -e "\x1B[31;1m"
|
||||||
@echo "[L] $@"
|
@echo "[L] $(1)"
|
||||||
@echo -n -e "\x1B[0m"
|
@echo -n -e "\x1B[0m"
|
||||||
$(OCAMLOPT) $(OPTS) $($(1)_LIBS) $($(1)_OBJS) -o $(1)
|
$(OCAMLOPT) $(OPTS) $($(1)_LIBS:=.cmxa) $($(1)_OBJS:=.cmx) -o $(1)
|
||||||
@echo ""
|
@echo ""
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue