3 OBJECTS = libthreads.o schedule.o model.o threads.o librace.o action.o \
4 nodestack.o clockvector.o main.o snapshot-interface.o cyclegraph.o \
5 datarace.o impatomic.o cmodelint.o \
6 snapshot.o malloc.o mymemory.o common.o mutex.o promise.o conditionvariable.o \
9 CPPFLAGS += -Iinclude -I.
10 LDFLAGS = -ldl -lrt -rdynamic
14 ifeq ($(UNAME), Darwin)
16 SHARED = -Wl,-undefined,dynamic_lookup -dynamiclib
23 debug: CPPFLAGS += -DCONFIG_DEBUG
31 $(CXX) $(SHARED) -o $(LIB_SO) $+ $(LDFLAGS)
34 $(CC) -fPIC -c malloc.c -DMSPACES -DONLY_MSPACES -DHAVE_MMAP=0 $(CPPFLAGS) -Wno-unused-variable
37 $(CXX) -MMD -MF .$@.d -fPIC -c $< $(CPPFLAGS)
42 -include $(OBJECTS:%=.%.d)
46 rm -f *.o *.so .*.d *.pdf *.dot
47 $(MAKE) -C $(TESTS_DIR) clean
59 $(MAKE) -C $(TESTS_DIR)
61 BENCH_DIR := benchmarks
65 @if ! test -d $(BENCH_DIR); then \
66 echo "Directory $(BENCH_DIR) does not exist" && \
67 echo "Please clone the benchmarks repository" && \
71 $(MAKE) -C $(BENCH_DIR)
74 pdfs: $(patsubst %.dot,%.pdf,$(wildcard *.dot))