From 3bab037cf58ebdbd2b443555c154d99935b7e00a Mon Sep 17 00:00:00 2001 From: James Booth Date: Fri, 23 May 2014 23:00:58 +0100 Subject: [PATCH] Added compilation flags for OSX test-c-plugin --- test-c-plugin/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test-c-plugin/Makefile b/test-c-plugin/Makefile index 1ed724b..910b2fd 100644 --- a/test-c-plugin/Makefile +++ b/test-c-plugin/Makefile @@ -1,7 +1,14 @@ +UNAME_S := $(shell uname -s) +ifeq ($(UNAME_S),Darwin) + LINK_FLAGS := -fno-common -flat_namespace -bundle -undefined suppress +else + LINK_FLAGS := -shared -fpic +endif + all: test-c-plugin.so %.so:%.o - $(CC) -shared -fpic -lprofanity -o $@ $^ + $(CC) $(LINK_FLAGS) -lprofanity -o $@ $^ %.o:%.c $(CC) $(INCLUDE) -D_GNU_SOURCE -D_BSD_SOURCE -fpic -O3 -std=c99 \