diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2009-10-22 17:09:15 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2009-10-22 17:09:15 +0000 |
commit | 69f9fee34958006778d0bf3a7e501ef5f8092aea (patch) | |
tree | 186d508e4979ad2ebca977d4c9982dae571cb53f /Makefile | |
parent | f35331b8491a2e46819d4e9afb0e364b65f92513 (diff) |
added cross-compiling for the iPhone OS when building on Mac OS X
svn path=/trunk/externals/ext13/; revision=12639
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 40 |
1 files changed, 30 insertions, 10 deletions
@@ -29,16 +29,34 @@ LIBS = UNAME := $(shell uname -s) ifeq ($(UNAME),Darwin) - SOURCES += $(SOURCES_Darwin) - EXTENSION = pd_darwin - OS = macosx - OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast - FAT_FLAGS = -arch i386 -arch ppc -mmacosx-version-min=10.4 - CFLAGS += -fPIC $(FAT_FLAGS) - LDFLAGS += -bundle -undefined dynamic_lookup $(FAT_FLAGS) - LIBS += -lc - STRIP = strip -x - endif + CPU := $(shell uname -p) + ifeq ($(CPU),arm) # iPhone/iPod Touch + SOURCES += $(SOURCES_Darwin) + EXTENSION = pd_darwin + OS = iphoneos + IPHONE_BASE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin + CC=$(IPHONE_BASE)/gcc + CPP=$(IPHONE_BASE)/cpp + CXX=$(IPHONE_BASE)/g++ + ISYSROOT = -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk + IPHONE_CFLAGS = -miphoneos-version-min=3.0 $(ISYSROOT) -arch armv6 + OPT_CFLAGS = -fast -funroll-loops -fomit-frame-pointer + CFLAGS := $(IPHONE_CFLAGS) $(OPT_CFLAGS) $(CFLAGS) + LDFLAGS += -arch armv6 -bundle -undefined dynamic_lookup $(ISYSROOT) + LIBS += -lc + STRIP = strip -x + else # Mac OS X + SOURCES += $(SOURCES_Darwin) + EXTENSION = pd_darwin + OS = macosx + OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast + FAT_FLAGS = -arch i386 -arch ppc -mmacosx-version-min=10.4 + CFLAGS += -fPIC $(FAT_FLAGS) + LDFLAGS += -bundle -undefined dynamic_lookup $(FAT_FLAGS) + LIBS += -lc + STRIP = strip -x + endif +endif ifeq ($(UNAME),Linux) SOURCES += $(SOURCES_Linux) EXTENSION = pd_linux @@ -150,3 +168,5 @@ showpaths: @echo "objectsdir: $(objectsdir)" @echo "LIBRARY_NAME: $(LIBRARY_NAME)" @echo "SOURCES: $(SOURCES)" + @echo "UNAME: $(UNAME)" + @echo "CPU: $(CPU)" |