Makefile: split part into a common makefile (common.mk)
authorBrian Norris <banorris@uci.edu>
Thu, 2 Aug 2012 23:33:16 +0000 (16:33 -0700)
committerBrian Norris <banorris@uci.edu>
Thu, 2 Aug 2012 23:40:02 +0000 (16:40 -0700)
Makefile
common.mk [new file with mode: 0644]

index 7a21be3..6a85ee8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,4 @@
-CC=gcc
-CXX=g++
-
-LIB_NAME=model
-LIB_SO=lib$(LIB_NAME).so
-
+include common.mk
 
 MODEL_CC=libthreads.cc schedule.cc model.cc threads.cc librace.cc action.cc nodestack.cc clockvector.cc main.cc snapshot-interface.cc cyclegraph.cc datarace.cc impatomic.cc cmodelint.cc promise.cc
 MODEL_O=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 promise.o
@@ -13,7 +8,7 @@ SHMEM_CC=snapshot.cc malloc.c mymemory.cc
 SHMEM_O=snapshot.o malloc.o mymemory.o
 SHMEM_H=snapshot.h snapshotimp.h mymemory.h
 
-CPPFLAGS=-Wall -g -O0 -Iinclude -I.
+CPPFLAGS += -Iinclude -I.
 LDFLAGS=-ldl -lrt
 SHARED=-shared
 
diff --git a/common.mk b/common.mk
new file mode 100644 (file)
index 0000000..378a659
--- /dev/null
+++ b/common.mk
@@ -0,0 +1,9 @@
+# A few common Makefile items
+
+CC=gcc
+CXX=g++
+
+LIB_NAME=model
+LIB_SO=lib$(LIB_NAME).so
+
+CPPFLAGS=-Wall -g -O0