aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCyrille Henry <nusmuk@users.sourceforge.net>2013-05-09 13:09:50 +0000
committerCyrille Henry <nusmuk@users.sourceforge.net>2013-05-09 13:09:50 +0000
commitf55c60d5324741405739a94abda10b9b180281cb (patch)
treec71e0731c20f626b0401907db9258bff1eeeb6bf /Makefile
parent58d9194c9d460d18f879d46c675f6758cb60967c (diff)
update to template 1.0.14
svn path=/trunk/externals/pmpd/; revision=17123
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 21 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 1163db0..c975ff4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-## Pd library template version 1.0.12
+## Pd library template version 1.0.14
# For instructions on how to use this template, see:
# http://puredata.info/docs/developer/MakefileTemplate
LIBRARY_NAME = pmpd
@@ -108,13 +108,19 @@ ifeq ($(UNAME),Darwin)
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4
else
- FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4
SOURCES += $(SOURCES_iphoneos)
+# Starting with Xcode 4.0, the PowerPC compiler is not installed by default
+ ifeq ($(wildcard /usr/llvm-gcc-4.2/libexec/gcc/powerpc*), )
+ FAT_FLAGS = -arch i386 -arch x86_64 -mmacosx-version-min=10.5
+ else
+ FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4
+ endif
endif
ALL_CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
# if the 'pd' binary exists, check the linking against it to aid with stripping
BUNDLE_LOADER = $(shell test ! -e $(PD_PATH)/bin/pd || echo -bundle_loader $(PD_PATH)/bin/pd)
- ALL_LDFLAGS += $(FAT_FLAGS) -bundle $(BUNDLE_LOADER) -undefined dynamic_lookup -L/sw/lib
+ ALL_LDFLAGS += $(FAT_FLAGS) -headerpad_max_install_names -bundle $(BUNDLE_LOADER) \
+ -undefined dynamic_lookup -L/sw/lib
SHARED_LDFLAGS += $(FAT_FLAGS) -dynamiclib -undefined dynamic_lookup \
-install_name @loader_path/$(SHARED_LIB) -compatibility_version 1 -current_version 1.0
ALL_LIBS += -lc $(LIBS_macosx)
@@ -129,22 +135,25 @@ endif
ifeq ($(UNAME),ANDROID)
CPU := arm
SOURCES += $(SOURCES_android)
- EXTENSION = pd_linux
+ EXTENSION = so
SHARED_EXTENSION = so
OS = android
PD_PATH = /usr
NDK_BASE := /usr/local/android-ndk
- NDK_PLATFORM_VERSION := 5
- NDK_SYSROOT=$(NDK_BASE)/platforms/android-$(NDK_PLATFORM_VERSION)/arch-arm
+ NDK_PLATFORM_LEVEL ?= 5
+ NDK_ABI=arm
+ NDK_SYSROOT=$(NDK_BASE)/platforms/android-$(NDK_PLATFORM_LEVEL)/arch-$(NDK_ABI)
NDK_UNAME := $(shell uname -s | tr '[A-Z]' '[a-z]')
- NDK_TOOLCHAIN_BASE=$(NDK_BASE)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/$(NDK_UNAME)-x86
- CC := $(NDK_TOOLCHAIN_BASE)/bin/arm-linux-androideabi-gcc --sysroot=$(NDK_SYSROOT)
+ NDK_COMPILER_VERSION=4.6
+ NDK_TOOLCHAIN=$(wildcard \
+ $(NDK_BASE)/toolchains/$(NDK_ABI)*-$(NDK_COMPILER_VERSION)/prebuilt/$(NDK_UNAME)-x86)
+ CC := $(wildcard $(NDK_TOOLCHAIN)/bin/*-linux-android*-gcc) --sysroot=$(NDK_SYSROOT)
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
CFLAGS +=
LDFLAGS += -rdynamic -shared
SHARED_LDFLAGS += -Wl,-soname,$(SHARED_LIB) -shared
LIBS += -lc $(LIBS_android)
- STRIP := $(NDK_TOOLCHAIN_BASE)/bin/arm-linux-androideabi-strip \
+ STRIP := $(wildcard $(NDK_TOOLCHAIN)/bin/$(NDK_ABI)-linux-android*-strip) \
--strip-unneeded -R .note -R .comment
DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m)
endif
@@ -436,3 +445,6 @@ showsetup:
@echo "pkglibdir: $(pkglibdir)"
@echo "DISTDIR: $(DISTDIR)"
@echo "ORIGDIR: $(ORIGDIR)"
+ @echo "NDK_TOOLCHAIN: $(NDK_TOOLCHAIN)"
+ @echo "NDK_BASE: $(NDK_BASE)"
+ @echo "NDK_SYSROOT: $(NDK_SYSROOT)"