X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=Makefile;h=9b20f4c8a65632c7d0f1c25e18417b38724c9ff2;hb=dcf7f575967bec560d500cc4f52e35c21671525c;hp=523709f011209b8d1e52033fa5b2dd1971326a1c;hpb=b927f3521995cdb7adab6059f1fa81b8d2e545f3;p=model-checker.git diff --git a/Makefile b/Makefile index 523709f..9b20f4c 100644 --- a/Makefile +++ b/Makefile @@ -21,12 +21,15 @@ program_H_SRCS := $(wildcard *.h) $(wildcard include/*.h) program_C_SRCS := $(wildcard *.c) $(wildcard *.cc) DEPS = make.deps -all: $(LIB_SO) $(DEPS) tests +all: $(LIB_SO) tests +$(DEPS): build_deps := 1 $(DEPS): $(program_C_SRCS) $(program_H_SRCS) $(CXX) -MM $(program_C_SRCS) $(CPPFLAGS) > $(DEPS) +ifeq ($(build_deps),1) include $(DEPS) +endif debug: CPPFLAGS += -DCONFIG_DEBUG debug: all @@ -41,7 +44,7 @@ $(LIB_SO): $(OBJECTS) malloc.o: malloc.c $(CC) -fPIC -c malloc.c -DMSPACES -DONLY_MSPACES -DHAVE_MMAP=0 $(CPPFLAGS) -Wno-unused-variable -%.o: %.cc +%.o: %.cc $(DEPS) $(CXX) -fPIC -c $< $(CPPFLAGS) PHONY += clean @@ -61,16 +64,16 @@ PHONY += tests tests: $(LIB_SO) $(MAKE) -C $(TESTS_DIR) -BENCHMARKS := benchmarks +BENCH_DIR := benchmarks PHONY += benchmarks benchmarks: $(LIB_SO) - @if ! test -d $(BENCHMARKS); then \ - echo "Directory $(BENCHMARKS) does not exist" && \ + @if ! test -d $(BENCH_DIR); then \ + echo "Directory $(BENCH_DIR) does not exist" && \ echo "Please clone the benchmarks repository" && \ echo && \ exit 1; \ fi - $(MAKE) -C $(BENCHMARKS) + $(MAKE) -C $(BENCH_DIR) .PHONY: $(PHONY)