From: Brian Norris Date: Thu, 2 Aug 2012 23:33:16 +0000 (-0700) Subject: Makefile: split part into a common makefile (common.mk) X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=commitdiff_plain;h=c7affe0434c47a25fb4b571136aea6089ac75592 Makefile: split part into a common makefile (common.mk) --- diff --git a/Makefile b/Makefile index 7a21be3d..6a85ee8d 100644 --- 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 index 00000000..378a6597 --- /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