Added compilation flags for OSX test-c-plugin

This commit is contained in:
James Booth
2014-05-23 23:00:58 +01:00
parent 6eca83400a
commit 3bab037cf5

View File

@@ -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 \