From f4220df52c4f0a7c8613ebd845b353a29151618a Mon Sep 17 00:00:00 2001 From: "matthias.ringwald@gmail.com" Date: Sat, 4 Jan 2014 20:37:31 +0000 Subject: [PATCH] switch to rpetrich's theos fork for now, build armv6+arm64 binaries --- Makefile.iphone | 8 ++++++-- PatchBlueTool/Makefile | 9 ++++++++- PrefsBundle/Makefile | 13 ++++++++++--- example/Makefile.iphone | 8 ++++++++ layout/DEBIAN/control | 2 +- layout/DEBIAN/extrainst_ | 1 + layout/DEBIAN/postinst | 1 + layout/DEBIAN/prerm | 1 + src/Makefile.iphone | 19 +++++++++++++------ 9 files changed, 49 insertions(+), 13 deletions(-) diff --git a/Makefile.iphone b/Makefile.iphone index 0d7ab0ee4..3108be506 100644 --- a/Makefile.iphone +++ b/Makefile.iphone @@ -1,3 +1,7 @@ -include $(THEOS)/makefiles/common.mk +# this uses rpetrich's lipoplastic feature not present in dhowett's repository +# you need to install Xcode 4.4.1 as /Applications/Xcode_4.4.1.app + SUBPROJECTS = src PatchBlueTool PrefsBundle -include $(FW_MAKEDIR)/aggregate.mk + +include $(THEOS)/makefiles/common.mk +include $(THEOS_MAKE_PATH)/aggregate.mk diff --git a/PatchBlueTool/Makefile b/PatchBlueTool/Makefile index ab80ed684..0e7b2213b 100644 --- a/PatchBlueTool/Makefile +++ b/PatchBlueTool/Makefile @@ -1,7 +1,14 @@ -include $(THEOS)/makefiles/common.mk +# lipoplastic setup for armv6 + arm64 compilation +TARGET := iphone:clang +THEOS_PLATFORM_SDK_ROOT_armv6 = /Applications/Xcode-4.4.1.app/Contents/Developer +SDKVERSION_armv6 = 5.1 +TARGET_IPHONEOS_DEPLOYMENT_VERSION = 3.0 +TARGET_IPHONEOS_DEPLOYMENT_VERSION_arm64 = 7.0 +ARCHS = armv6 arm64 TOOL_NAME = PatchBlueTool PatchBlueTool_FILES = PatchBlueTool.c +include $(THEOS)/makefiles/common.mk include $(THEOS_MAKE_PATH)/tool.mk diff --git a/PrefsBundle/Makefile b/PrefsBundle/Makefile index 265684c00..af6088418 100644 --- a/PrefsBundle/Makefile +++ b/PrefsBundle/Makefile @@ -1,14 +1,21 @@ -export TARGET=iphone:latest:4.0 -include $(THEOS)/makefiles/common.mk +# lipoplastic setup for armv6 + arm64 compilation +TARGET := iphone:clang +THEOS_PLATFORM_SDK_ROOT_armv6 = /Applications/Xcode-4.4.1.app/Contents/Developer +SDKVERSION_armv6 = 5.1 +TARGET_IPHONEOS_DEPLOYMENT_VERSION = 3.0 +TARGET_IPHONEOS_DEPLOYMENT_VERSION_arm64 = 7.0 +ARCHS = armv6 arm64 BUNDLE_NAME = BTstack BTstack_FILES = PrefsViewController.m BluetoothController.m BluetoothTableViewAdapter.m BTstack_INSTALL_PATH = /Library/PreferenceBundles BTstack_FRAMEWORKS = UIKit BTstack_CFLAGS = -I.. -I../include -g -BTstack_LDFLAGS = -L../src/obj -lBTstack + +BTstack_LDFLAGS = -L../src/.theos/obj -lBTstack BTstack_PRIVATE_FRAMEWORKS = Preferences +include $(THEOS)/makefiles/common.mk include $(THEOS_MAKE_PATH)/bundle.mk internal-stage:: diff --git a/example/Makefile.iphone b/example/Makefile.iphone index 2bfd41a04..8d85dfbb5 100644 --- a/example/Makefile.iphone +++ b/example/Makefile.iphone @@ -1,5 +1,13 @@ include $(THEOS)/makefiles/common.mk +# lipoplastic setup for armv6 + arm64 compilation +TARGET := iphone:clang +THEOS_PLATFORM_SDK_ROOT_armv6 = /Applications/Xcode-4.4.1.app/Contents/Developer +SDKVERSION_armv6 = 5.1 +TARGET_IPHONEOS_DEPLOYMENT_VERSION = 3.0 +TARGET_IPHONEOS_DEPLOYMENT_VERSION_arm64 = 7.0 +ARCHS = armv6 arm64 + ADDITIONAL_CFLAGS = -I.. -I../include ADDITIONAL_LDFLAGS = -L../src/obj -lBTstack diff --git a/layout/DEBIAN/control b/layout/DEBIAN/control index 2e93ef590..535e6779a 100644 --- a/layout/DEBIAN/control +++ b/layout/DEBIAN/control @@ -10,4 +10,4 @@ Maintainer: Matthias Ringwald Author: Matthias Ringwald Section: Development Tag: role::developer -Version: 0.6 +Version: 0.8 diff --git a/layout/DEBIAN/extrainst_ b/layout/DEBIAN/extrainst_ index 26a47b0a6..20b7dd6ec 100755 --- a/layout/DEBIAN/extrainst_ +++ b/layout/DEBIAN/extrainst_ @@ -5,3 +5,4 @@ cp /usr/sbin/BlueTool /tmp/BlueToolH4 ldid -s /tmp/BlueToolH4 cp -f /tmp/BlueToolH4 /usr/local/bin rm -f /tmp/BlueToolH4 +exit 0 diff --git a/layout/DEBIAN/postinst b/layout/DEBIAN/postinst index 638de8543..da2f1eeac 100755 --- a/layout/DEBIAN/postinst +++ b/layout/DEBIAN/postinst @@ -1,2 +1,3 @@ #!/bin/sh /bin/launchctl load /Library/LaunchDaemons/ch.ringwald.BTstack.plist 2&> /dev/null +exit 0 diff --git a/layout/DEBIAN/prerm b/layout/DEBIAN/prerm index 4851a5287..96ba98e36 100755 --- a/layout/DEBIAN/prerm +++ b/layout/DEBIAN/prerm @@ -1,3 +1,4 @@ #!/bin/sh /bin/launchctl unload /Library/LaunchDaemons/ch.ringwald.BTstack.plist 2&> /dev/null rm -f /usr/local/bin/BlueToolH4 +exit 0 diff --git a/src/Makefile.iphone b/src/Makefile.iphone index bdc3b9563..1548c09e0 100644 --- a/src/Makefile.iphone +++ b/src/Makefile.iphone @@ -1,4 +1,10 @@ -include $(THEOS)/makefiles/common.mk +# lipoplastic setup for armv6 + arm64 compilation +TARGET := iphone:clang +THEOS_PLATFORM_SDK_ROOT_armv6 = /Applications/Xcode-4.4.1.app/Contents/Developer +SDKVERSION_armv6 = 5.1 +TARGET_IPHONEOS_DEPLOYMENT_VERSION = 3.0 +TARGET_IPHONEOS_DEPLOYMENT_VERSION_arm64 = 7.0 +ARCHS = armv6 arm64 LIBRARY_NAME = libBTstack libBTstack_FILES = btstack.c hci_cmds.c linked_list.c @@ -31,11 +37,12 @@ BTdaemon_CFLAGS = -I../include -I.. BTdaemon_LDFLAGS += $(SYSROOT)/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit after-BTdaemon-stage:: - echo "current dir" `pwd` - mkdir -p ../_/usr/local/lib - mkdir -p ../_/usr/local/bin - ln -s /usr/lib/libBTstack.dylib ../_/usr/local/lib - ln -s /usr/bin/BTdaemon ../_/usr/local/bin/BTdaemon + echo $(THEOS_STAGING_DIR) + mkdir -p ../.theos/_/usr/local/lib + mkdir -p ../.theos/_/usr/local/bin + ln -s /usr/lib/libBTstack.dylib ../.theos/_/usr/local/lib + ln -s /usr/bin/BTdaemon ../.theos/_/usr/local/bin/BTdaemon +include $(THEOS)/makefiles/common.mk include $(THEOS_MAKE_PATH)/library.mk include $(THEOS_MAKE_PATH)/tool.mk