X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FMakefile;h=9d7acb0894b7db264e5b4bd4e90a61cff6be0a27;hb=d17fbaf88464f1a9e8fe2b7df96631652ee17122;hp=5e5e76c6c2b546e197ec3d32b220c6e20a32d857;hpb=8349c08d00575cdee39e94796d33fb4c44ddd50b;p=model-checker.git 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)