aboutsummaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2012-08-07 14:06:00 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2012-11-24 08:56:54 -0500
commit7ed25faa26fc3718aadbfe41b0ccd8f853063db3 (patch)
treea2ab6f839c5237b1bdbd1fbfbbc2b2945f9d6395 /native
parent6e7c15480d7f5e57636d5648c97c4277eea2c704 (diff)
Cleanup native/ Makefile
- Normalize line endings. - Introduce DEFS variable to allow user to specify definitions in .config. - Add -Werror to avoid accumulating warnings.
Diffstat (limited to 'native')
-rw-r--r--native/Makefile20
1 files changed, 11 insertions, 9 deletions
diff --git a/native/Makefile b/native/Makefile
index 80c8310..9ae543a 100644
--- a/native/Makefile
+++ b/native/Makefile
@@ -19,6 +19,7 @@ DISABLED_WARNINGS += -Wno-deprecated # We still use ext::hash_map<>.
19 19
20INCLUDES = -Iinclude -I${GMP_PATH}/include 20INCLUDES = -Iinclude -I${GMP_PATH}/include
21LIBS = -L${GMP_PATH}/lib -lgmp -lgmpxx 21LIBS = -L${GMP_PATH}/lib -lgmp -lgmpxx
22DEFS ?=
22 23
23OS := $(shell uname) 24OS := $(shell uname)
24 25
@@ -41,16 +42,17 @@ ifeq ($(OS),Linux)
41LIBS += -lrt 42LIBS += -lrt
42endif 43endif
43 44
44CXXFLAGS = -Wall -Wextra $(DISABLED_WARNINGS) -fPIC $(INCLUDES)
45LDFLAGS = $(LIBS)
46SWIGFLAGS = -python -c++ -outdir . -includeall -Iinclude
47 45
46# #### Debug support ####
48ifeq ($(DEBUG),y) 47ifeq ($(DEBUG),y)
49CXXFLAGS += -g -DDEBUG 48DEFS += -g -DDEBUG
50else 49else
51CXXFLAGS += -O2 -DNDEBUG 50DEFS += -O2 -DNDEBUG
52endif 51endif
53 52
53CXXFLAGS = -Wall -Wextra -Werror $(DISABLED_WARNINGS) -fPIC $(INCLUDES) $(DEFS)
54LDFLAGS = $(LIBS)
55SWIGFLAGS = -python -c++ -outdir . -includeall -Iinclude
54vpath %.cc interface 56vpath %.cc interface
55vpath %.cpp src src/edf src/blocking 57vpath %.cpp src src/edf src/blocking
56 58
@@ -85,13 +87,13 @@ interface/%_wrap.cc: interface/%.i
85 $(SWIG) $(SWIGFLAGS) -o $@ $< 87 $(SWIG) $(SWIGFLAGS) -o $@ $<
86 88
87interface/%_wrap.o: interface/%_wrap.cc 89interface/%_wrap.o: interface/%_wrap.cc
88 $(CXX) -fPIC $(PYTHON_INC) -c -o $@ $+ $(INCLUDES) 90 $(CXX) -fPIC $(PYTHON_INC) -c -o $@ $+ $(INCLUDES)
89 91
90_sched.so: ${CORE_OBJ} ${EDF_OBJ} interface/sched_wrap.o 92_sched.so: ${CORE_OBJ} ${EDF_OBJ} interface/sched_wrap.o
91 $(CXX) $(SOFLAGS) $(PYTHON_LIB) -o $@ $+ $(LDFLAGS) 93 $(CXX) $(SOFLAGS) $(PYTHON_LIB) -o $@ $+ $(LDFLAGS)
92 94
93_locking.so: ${SYNC_OBJ} interface/locking_wrap.o 95_locking.so: ${SYNC_OBJ} interface/locking_wrap.o
94 $(CXX) $(SOFLAGS) $(PYTHON_LIB) -o $@ $+ $(LDFLAGS) 96 $(CXX) $(SOFLAGS) $(PYTHON_LIB) -o $@ $+ $(LDFLAGS)
95 97
96_sim.so: ${CORE_OBJ} ${SCHED_OBJ} interface/sim_wrap.o 98_sim.so: ${CORE_OBJ} ${SCHED_OBJ} interface/sim_wrap.o
97 $(CXX) $(SOFLAGS) $(PYTHON_LIB) -o $@ $+ $(LDFLAGS) 99 $(CXX) $(SOFLAGS) $(PYTHON_LIB) -o $@ $+ $(LDFLAGS)