X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=Makefile;h=1cc4f4baa9cb1054f34b5ba2497bb32c175aa87f;hb=c9a40b4c0218a83d4ec91fe3f9019dc9dbd6b142;hp=620a9ecd91353b6aab6484e409f6adef8fc23bc7;hpb=538175be35df96c8858f384d0001c35701f5e666;p=c11tester.git diff --git a/Makefile b/Makefile index 620a9ecd..1cc4f4ba 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,10 @@ 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 + snapshot.o malloc.o mymemory.o common.o mutex.o promise.o conditionvariable.o -CPPFLAGS += -Iinclude -I. -rdynamic -LDFLAGS = -ldl -lrt +CPPFLAGS += -Iinclude -I. +LDFLAGS = -ldl -lrt -rdynamic SHARED = -shared # Mac OSX options @@ -17,20 +17,12 @@ 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 +PHONY += docs docs: *.c *.cc *.h doxygen @@ -38,14 +30,16 @@ $(LIB_SO): $(OBJECTS) $(CXX) $(SHARED) -o $(LIB_SO) $(OBJECTS) $(LDFLAGS) malloc.o: malloc.c - $(CC) -fPIC -c malloc.c -DMSPACES -DONLY_MSPACES $(CPPFLAGS) + $(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) + +-include $(OBJECTS:%=.%.d) PHONY += clean clean: - rm -f *.o *.so + rm -f *.o *.so .*.d $(MAKE) -C $(TESTS_DIR) clean PHONY += mrclean @@ -60,4 +54,16 @@ PHONY += tests tests: $(LIB_SO) $(MAKE) -C $(TESTS_DIR) +BENCH_DIR := benchmarks + +PHONY += benchmarks +benchmarks: $(LIB_SO) + @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 $(BENCH_DIR) + .PHONY: $(PHONY)