X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=Makefile;h=b653e7699c4c055dbfa99b68fab57c5fd95d303c;hp=523709f011209b8d1e52033fa5b2dd1971326a1c;hb=90471233ff4dcca9a196152574dca4e7cf183698;hpb=bedc2b9424e82860ac30834707b518f5f2a56751 diff --git a/Makefile b/Makefile index 523709f0..b653e769 100644 --- a/Makefile +++ b/Makefile @@ -17,16 +17,7 @@ endif TESTS_DIR = test -program_H_SRCS := $(wildcard *.h) $(wildcard include/*.h) -program_C_SRCS := $(wildcard *.c) $(wildcard *.cc) -DEPS = make.deps - -all: $(LIB_SO) $(DEPS) tests - -$(DEPS): $(program_C_SRCS) $(program_H_SRCS) - $(CXX) -MM $(program_C_SRCS) $(CPPFLAGS) > $(DEPS) - -include $(DEPS) +all: $(LIB_SO) tests debug: CPPFLAGS += -DCONFIG_DEBUG debug: all @@ -36,17 +27,22 @@ docs: *.c *.cc *.h doxygen $(LIB_SO): $(OBJECTS) - $(CXX) $(SHARED) -o $(LIB_SO) $(OBJECTS) $(LDFLAGS) + $(CXX) $(SHARED) -o $(LIB_SO) $+ $(LDFLAGS) malloc.o: malloc.c $(CC) -fPIC -c malloc.c -DMSPACES -DONLY_MSPACES -DHAVE_MMAP=0 $(CPPFLAGS) -Wno-unused-variable %.o: %.cc - $(CXX) -fPIC -c $< $(CPPFLAGS) + $(CXX) -MMD -MF .$@.d -fPIC -c $< $(CPPFLAGS) + +%.pdf: %.dot + dot -Tpdf $< -o $@ + +-include $(OBJECTS:%=.%.d) PHONY += clean clean: - rm -f *.o *.so + rm -f *.o *.so .*.d *.pdf *.dot $(MAKE) -C $(TESTS_DIR) clean PHONY += mrclean @@ -61,16 +57,19 @@ 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 += pdfs +pdfs: $(patsubst %.dot,%.pdf,$(wildcard *.dot)) .PHONY: $(PHONY)