Makefile: move common Mac flags to common.mk
authorBrian Norris <banorris@uci.edu>
Thu, 20 Sep 2012 16:44:31 +0000 (09:44 -0700)
committerBrian Norris <banorris@uci.edu>
Thu, 20 Sep 2012 16:44:31 +0000 (09:44 -0700)
Makefile
common.mk
test/Makefile

index a732cb7..620a9ec 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,6 @@ SHARED = -shared
 
 # Mac OSX options
 ifeq ($(UNAME), Darwin)
-CPPFLAGS += -D_XOPEN_SOURCE -DMAC
 LDFLAGS = -ldl
 SHARED = -Wl,-undefined,dynamic_lookup -dynamiclib
 endif
index e9e4060..009ae63 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -9,3 +9,8 @@ LIB_NAME = model
 LIB_SO = lib$(LIB_NAME).so
 
 CPPFLAGS += -Wall -g -O0
+
+# Mac OSX options
+ifeq ($(UNAME), Darwin)
+CPPFLAGS += -D_XOPEN_SOURCE -DMAC
+endif
index 8789324..a3de6fe 100644 (file)
@@ -2,11 +2,6 @@ include ../common.mk
 
 CPPFLAGS += -I.. -I../include
 
-# Mac OSX options
-ifeq ($(UNAME), Darwin)
-CPPFLAGS += -D_XOPEN_SOURCE -DMAC
-endif
-
 SRCS = $(wildcard *.c)
 CPSRCS = $(wildcard *.cc)
 OBJS = $(patsubst %.c,%.o,$(SRCS)) $(patsubst %.cc,%.o,$(CPSRCS))