From 538175be35df96c8858f384d0001c35701f5e666 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Thu, 20 Sep 2012 09:44:31 -0700 Subject: [PATCH] Makefile: move common Mac flags to common.mk --- Makefile | 1 - common.mk | 5 +++++ test/Makefile | 5 ----- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index a732cb76..620a9ecd 100644 --- 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 diff --git a/common.mk b/common.mk index e9e40600..009ae634 100644 --- 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 diff --git a/test/Makefile b/test/Makefile index 87893243..a3de6fe9 100644 --- a/test/Makefile +++ b/test/Makefile @@ -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)) -- 2.34.1