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
20 program_H_SRCS := $(wildcard *.h) $(wildcard include/*.h)
21 program_C_SRCS := $(wildcard *.c) $(wildcard *.cc)
26 $(DEPS): build_deps := 1
27 $(DEPS): $(program_C_SRCS) $(program_H_SRCS)
28 $(CXX) -MM $(program_C_SRCS) $(CPPFLAGS) > $(DEPS)
30 ifeq ($(build_deps),1)
34 debug: CPPFLAGS += -DCONFIG_DEBUG
42 $(CXX) $(SHARED) -o $(LIB_SO) $(OBJECTS) $(LDFLAGS)
45 $(CC) -fPIC -c malloc.c -DMSPACES -DONLY_MSPACES -DHAVE_MMAP=0 $(CPPFLAGS) -Wno-unused-variable
48 $(CXX) -fPIC -c $< $(CPPFLAGS)
53 $(MAKE) -C $(TESTS_DIR) clean
65 $(MAKE) -C $(TESTS_DIR)
67 BENCHMARKS := benchmarks
71 @if ! test -d $(BENCHMARKS); then \
72 echo "Directory $(BENCHMARKS) does not exist" && \
73 echo "Please clone the benchmarks repository" && \
77 $(MAKE) -C $(BENCHMARKS)