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
8 CPPFLAGS += -Iinclude -I.
9 LDFLAGS = -ldl -lrt -rdynamic
13 ifeq ($(UNAME), Darwin)
15 SHARED = -Wl,-undefined,dynamic_lookup -dynamiclib
22 debug: CPPFLAGS += -DCONFIG_DEBUG
30 $(CXX) $(SHARED) -o $(LIB_SO) $+ $(LDFLAGS)
33 $(CC) -fPIC -c malloc.c -DMSPACES -DONLY_MSPACES -DHAVE_MMAP=0 $(CPPFLAGS) -Wno-unused-variable
36 $(CXX) -MMD -MF .$@.d -fPIC -c $< $(CPPFLAGS)
41 -include $(OBJECTS:%=.%.d)
45 rm -f *.o *.so .*.d *.pdf *.dot
46 $(MAKE) -C $(TESTS_DIR) clean
58 $(MAKE) -C $(TESTS_DIR)
60 BENCH_DIR := benchmarks
64 @if ! test -d $(BENCH_DIR); then \
65 echo "Directory $(BENCH_DIR) does not exist" && \
66 echo "Please clone the benchmarks repository" && \
70 $(MAKE) -C $(BENCH_DIR)
73 pdfs: $(patsubst %.dot,%.pdf,$(wildcard *.dot))