Change initialize a bit
[c11tester.git] / Makefile
index a7d2b5264c36c0fe7f5357ae82fd684995526f27..adb080de5d44871596ee201fb659666684645bbc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,15 @@
 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 \
+          clockvector.o main.o cyclegraph.o \
           datarace.o impatomic.o cmodelint.o \
-          snapshot.o malloc.o mymemory.o common.o mutex.o promise.o conditionvariable.o \
-          context.o execution.o libannotate.o pthread.o
+          snapshot.o malloc.o mymemory.o common.o mutex.o conditionvariable.o \
+          context.o execution.o libannotate.o plugins.o pthread.o futex.o fuzzer.o \
+          sleeps.o history.o funcnode.o funcinst.o predicate.o printf.o newfuzzer.o \
+          concretepredicate.o waitobj.o hashfunction.o pipe.o actionlist.o
 
 CPPFLAGS += -Iinclude -I.
-LDFLAGS := -ldl -lrt -rdynamic
+LDFLAGS := -ldl -lrt -rdynamic -lpthread
 SHARED := -shared
 
 # Mac OSX options
@@ -16,11 +18,9 @@ LDFLAGS := -ldl
 SHARED := -Wl,-undefined,dynamic_lookup -dynamiclib
 endif
 
-TESTS_DIR := test
-
 MARKDOWN := doc/Markdown/Markdown.pl
 
-all: $(LIB_SO) tests README.html
+all: $(LIB_SO) README.html
 
 debug: CPPFLAGS += -DCONFIG_DEBUG
 debug: all
@@ -32,9 +32,14 @@ docs: *.c *.cc *.h README.html
 README.html: README.md
        $(MARKDOWN) $< > $@
 
-
 malloc.o: malloc.c
-       $(CC) -fPIC -c malloc.c -DMSPACES -DONLY_MSPACES -DHAVE_MMAP=0 $(CPPFLAGS) -Wno-unused-variable
+       $(CC) -fPIC -c malloc.c -DMSPACES -DONLY_MSPACES -DHAVE_MMAP=1 $(CPPFLAGS) -Wno-unused-variable
+
+printf.o: printf.c
+       $(CC) -fPIC -c printf.c $(CPPFLAGS)
+
+futex.o: futex.cc
+       $(CXX) -fPIC -c futex.cc -std=c++11 $(CPPFLAGS)
 
 %.o : %.cc
        $(CXX) -MMD -MF .$@.d -fPIC -c $< $(CPPFLAGS)
@@ -51,7 +56,6 @@ $(LIB_SO): $(OBJECTS)
 PHONY += clean
 clean:
        rm -f *.o *.so .*.d *.pdf *.dot
-       $(MAKE) -C $(TESTS_DIR) clean
 
 PHONY += mrclean
 mrclean: clean
@@ -61,10 +65,6 @@ PHONY += tags
 tags:
        ctags -R
 
-PHONY += tests
-tests: $(LIB_SO)
-       $(MAKE) -C $(TESTS_DIR)
-
 BENCH_DIR := benchmarks
 
 PHONY += benchmarks
@@ -85,3 +85,9 @@ pdfs: $(patsubst %.dot,%.pdf,$(wildcard *.dot))
 # A 1-inch margin PDF generated by 'pandoc'
 %.pdf: %.md
        pandoc -o $@ $< -V header-includes='\usepackage[margin=1in]{geometry}'
+
+tabbing:
+       uncrustify -c C.cfg --no-backup --replace *.cc
+       uncrustify -c C.cfg --no-backup --replace *.h
+       uncrustify -c C.cfg --no-backup --replace include/*
+