X-Git-Url: https://git.kengrimes.com/?p=henge%2Fapc.git;a=blobdiff_plain;f=Makefile;fp=Makefile;h=7b8934d73c96e2b4ba774231e97417d50c2cb92d;hp=62bf1193ccb17282f4c383ae321a64a51ac9bfe6;hb=b0013aa7f2237fb88daf3f2ba856c8cdfe222fa2;hpb=8cae1f16c2a4294dddd26b21f03d594eca97ea8a diff --git a/Makefile b/Makefile index 62bf119..7b8934d 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # This makefile builds APC, the Asset Package Compiler for Henge, on the system. ################################################################################ # Driver sources -DRIVERS ?= apc testapc +DRIVERS ?= apc testapc testston # Debug Level DEBUG ?= 1 @@ -50,10 +50,11 @@ cTRG := $(patsubst %.c,%.o,$(cSRC) $(cGEN)) ldSRC := $(filter-out $(DRIVERS:%=\%/%.o),$(cTRG)) cTRG += $(cTRG:%.o=%-d.o) ldTRG := $(DRIVERS:%=%-d) $(DRIVERS) -ldDEP = $(filter %/$1.o,$(cTRG)) $(if $(filter %-d,$1),$(ldSRC:%.o=%-d.o),$(ldSRC)) +ldDEP = $(filter %/$1.o,$(cTRG)) +ldDEP += $(if $(filter testston%,$1),,$(if $(filter %-d,$1),$(ldSRC:%.o=%-d.o),$(ldSRC))) # Determine if '1' is newer than '2' -TSTAMP = $(if $(wildcard $1),$(shell stat -c %Y $1),0$(info nots: $1)) +TSTAMP = $(if $(wildcard $1),$(shell stat -c %Y $1),) NEWER = $(eval 4 := $(call TSTAMP,$(dir $2)$1)) NEWER += $(eval 5 := $(call TSTAMP,$2)) NEWER += $(if $(filter $5,$(firstword $(sort $4 $5))),$1,$2)