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 a732cb763ad7a8dcf1ef9900ac4473921000163c..620a9ecd91353b6aab6484e409f6adef8fc23bc7 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 e9e406002296c48e8e324f6cf440875487ff6a47..009ae634827f39f4d8dab210611e7b9f88bcbcec 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 87893243ce83e32f9e27331ec8620de14c6bce2d..a3de6fe9e7c1030d4d783cc3d5880606ddd9140f 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))