From a8f72d8c9defd4a485080a6abe89546cdfee38e9 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Tue, 19 Feb 2008 14:25:52 +0100 Subject: [PATCH] Makefile: Rewrite *_OBJS and *_LIBS without extensions. --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index dc00884..40fc4aa 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ PROGRAMS=justnukeit -justnukeit_OBJS=Position.cmx Maze.cmx Player.cmx main.cmx +justnukeit_OBJS=Position Maze Player main 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)) @@ -17,12 +17,12 @@ OCAMLC=ocamlc OPTS=-w A -g -thread -I +sdl -ccopt -L+sdl define PROGRAM_template -ALL_OBJS += $$($(1)_OBJS) -$(1): $$($(1)_OBJS) +ALL_OBJS += $($(1)_OBJS) +$(1): $$($(1)_OBJS:=.cmx) @echo -n -e "\x1B[31;1m" - @echo "[L] $@" + @echo "[L] $(1)" @echo -n -e "\x1B[0m" - $(OCAMLOPT) $(OPTS) $($(1)_LIBS) $($(1)_OBJS) -o $(1) + $(OCAMLOPT) $(OPTS) $($(1)_LIBS:=.cmxa) $($(1)_OBJS:=.cmx) -o $(1) @echo "" endef