X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=Makefile;h=ff5c7d9d26c4e28ff2a1ce8f2e1b9eed3c5790d0;hb=d2cbbe4ce6d8f6e1aa23b8fe639ed58edf1789b7;hp=a0608b5dadd49e2376db260c165fd3b9cce71678;hpb=0f0bd83aa330ef6461acb1b0758615e1e15a9322;p=model-checker.git diff --git a/Makefile b/Makefile index a0608b5..ff5c7d9 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ 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 + snapshot.o malloc.o mymemory.o common.o mutex.o promise.o conditionvariable.o CPPFLAGS += -Iinclude -I. -rdynamic LDFLAGS = -ldl -lrt @@ -11,7 +11,6 @@ SHARED = -shared # Mac OSX options ifeq ($(UNAME), Darwin) -CPPFLAGS += -D_XOPEN_SOURCE -DMAC LDFLAGS = -ldl SHARED = -Wl,-undefined,dynamic_lookup -dynamiclib endif @@ -32,6 +31,7 @@ include $(DEPS) debug: CPPFLAGS += -DCONFIG_DEBUG debug: all +PHONY += docs docs: *.c *.cc *.h doxygen @@ -39,20 +39,38 @@ $(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) +PHONY += clean clean: rm -f *.o *.so $(MAKE) -C $(TESTS_DIR) clean +PHONY += mrclean mrclean: clean rm -rf docs -tags:: +PHONY += tags +tags: ctags -R -tests:: $(LIB_SO) +PHONY += tests +tests: $(LIB_SO) $(MAKE) -C $(TESTS_DIR) + +BENCHMARKS := benchmarks + +PHONY += benchmarks +benchmarks: $(LIB_SO) + @if ! test -d $(BENCHMARKS); then \ + echo "Directory $(BENCHMARKS) does not exist" && \ + echo "Please clone the benchmarks repository" && \ + echo && \ + exit 1; \ + fi + $(MAKE) -C $(BENCHMARKS) + +.PHONY: $(PHONY)