X-Git-Url: http://plrg.eecs.uci.edu/git/?p=cdsspec-compiler.git;a=blobdiff_plain;f=test%2FMakefile;h=9d7acb0894b7db264e5b4bd4e90a61cff6be0a27;hp=5e5e76c6c2b546e197ec3d32b220c6e20a32d857;hb=93221839adb57ec10dd80f42be3963732cd2e236;hpb=a0aabd321ed9a43bd0ff4be0d9a7751138c01004 diff --git a/test/Makefile b/test/Makefile index 5e5e76c..9d7acb0 100644 --- a/test/Makefile +++ b/test/Makefile @@ -8,15 +8,19 @@ include $(BASE)/common.mk DIR := litmus include $(DIR)/Makefile +DEPS := $(join $(addsuffix ., $(dir $(OBJECTS))), $(addsuffix .d, $(notdir $(OBJECTS)))) + CPPFLAGS += -I$(BASE) -I$(BASE)/include all: $(OBJECTS) +-include $(DEPS) + %.o: %.c - $(CC) -o $@ $< $(CPPFLAGS) -L$(BASE) -l$(LIB_NAME) + $(CC) -MMD -MF $(@D)/.$(@F).d -o $@ $< $(CPPFLAGS) -L$(BASE) -l$(LIB_NAME) %.o: %.cc - $(CXX) -o $@ $< $(CPPFLAGS) -L$(BASE) -l$(LIB_NAME) + $(CXX) -MMD -MF $(@D)/.$(@F).d -o $@ $< $(CPPFLAGS) -L$(BASE) -l$(LIB_NAME) clean:: - rm -f $(OBJECTS) + rm -f $(OBJECTS) $(DEPS)