fix/update Makefile so it is possible to build universal binaries on OS X

use such commandline :
LDFLAGS="-arch ppc64 -arch ppc -mmacosx-version-min=10.4" CFLAGS="-arch ppc64 -arch ppc" make
This commit is contained in:
Thomas BERNARD 2015-10-25 22:24:33 +01:00
parent f4b173d3b9
commit 53367cf85a
1 changed files with 8 additions and 4 deletions

View File

@ -15,6 +15,7 @@ VERSION = $(shell cat VERSION)
ifeq ($(OS), Darwin)
JARSUFFIX=mac
LIBTOOL ?= $(shell which libtool)
endif
ifeq ($(OS), Linux)
JARSUFFIX=linux
@ -261,7 +262,11 @@ depend:
makedepend -Y -- $(CFLAGS) -- $(SRCS) 2>/dev/null
$(LIBRARY): $(LIBOBJS)
ifeq ($(OS), Darwin)
$(LIBTOOL) -static -o $@ $?
else
$(AR) crs $@ $?
endif
$(SHAREDLIBRARY): $(LIBOBJS)
ifeq ($(OS), Darwin)
@ -272,13 +277,12 @@ else
endif
upnpc-static: upnpc.o $(LIBRARY)
$(CC) $(LDFLAGS) -o $@ $^
$(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES) $(LDLIBS)
upnpc-shared: upnpc.o $(SHAREDLIBRARY)
$(CC) $(LDFLAGS) -o $@ $^
$(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES) $(LDLIBS)
listdevices: listdevices.o $(LIBRARY) $(LDLIBS)
$(CC) $(LDFLAGS) -o $@ $^
listdevices: listdevices.o $(LIBRARY)
testminixml: $(TESTMINIXMLOBJS)