X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=Makefile;h=7539aca6acb25facc760924f90a45949b364be0e;hp=ff5c7d9d26c4e28ff2a1ce8f2e1b9eed3c5790d0;hb=c123ef2c7d98d23474d2d2b121b56b502d75665b;hpb=88e6ab1f325b2b67695f20954b5d1f1746d13c8a diff --git a/Makefile b/Makefile index ff5c7d9d..7539aca6 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,11 @@ include common.mk OBJECTS = libthreads.o schedule.o model.o threads.o librace.o action.o \ nodestack.o clockvector.o main.o snapshot-interface.o cyclegraph.o \ datarace.o impatomic.o cmodelint.o \ - snapshot.o malloc.o mymemory.o common.o mutex.o promise.o conditionvariable.o + snapshot.o malloc.o mymemory.o common.o mutex.o promise.o conditionvariable.o \ + context.o scanalysis.o -CPPFLAGS += -Iinclude -I. -rdynamic -LDFLAGS = -ldl -lrt +CPPFLAGS += -Iinclude -I. +LDFLAGS = -ldl -lrt -rdynamic SHARED = -shared # Mac OSX options @@ -17,16 +18,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 +28,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 +58,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)