From: Jay Freeman (saurik) Date: Tue, 31 Dec 2013 23:40:28 +0000 (-0800) Subject: Compile everything for iOS 7 ARM64 using Xcode 5. X-Git-Tag: v0.9.500~129 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/0ad8029fb9d317c6d2a5370ecc52f1e707f97a95 Compile everything for iOS 7 ARM64 using Xcode 5. --- diff --git a/xcode.mk b/xcode.mk index edebc70..42aa66f 100644 --- a/xcode.mk +++ b/xcode.mk @@ -71,7 +71,7 @@ build.ios-$(1)/.libs/libcycript.a: build-ios-$(1) @ endef -$(foreach arch,armv6 armv7 armv7s,$(eval $(call build_ios,$(arch)))) +$(foreach arch,armv6 armv7 armv7s arm64,$(eval $(call build_ios,$(arch)))) define build_sim .PHONY: build-sim-$(1) @@ -96,10 +96,13 @@ endef $(foreach arch,armv6,$(eval $(call build_arm,$(arch)))) +Cycript_/%.dylib: build.mac-i386/.libs/%.dylib build.mac-x86_64/.libs/%.dylib build.ios-armv6/.libs/%.dylib build.ios-arm64/.libs/%.dylib + @mkdir -p $(dir $@) + $(lipo) -create -output $@ $^ + Cycript_/%: build.mac-i386/.libs/% build.mac-x86_64/.libs/% build.ios-armv6/.libs/% @mkdir -p $(dir $@) $(lipo) -create -output $@ $^ - # XXX: this should probably not entitle the dylibs codesign -s $(codesign) --entitlement cycript.xml $@ Cycript_/libcycript-sys.dylib: @@ -115,7 +118,7 @@ libcycript-%.o: build.%/.libs/libcycript.a @mkdir -p $(dir $@) ld -r -arch $$($(lipo) -detailed_info $< | sed -e '/^Non-fat file: / ! d; s/.*: //') -o $@ -all_load $< libffi.a -libcycript.o: libcycript-ios-armv6.o libcycript-ios-armv7.o libcycript-ios-armv7s.o libcycript-sim-i386.o +libcycript.o: libcycript-ios-armv6.o libcycript-ios-armv7.o libcycript-ios-armv7s.o libcycript-ios-arm64.o libcycript-sim-i386.o $(lipo) -create -output $@ $^ Cycript.framework/Cycript: libcycript.o diff --git a/xcode.sh b/xcode.sh index 0fa5004..fd656b5 100755 --- a/xcode.sh +++ b/xcode.sh @@ -81,25 +81,25 @@ function build() { } for arch in i386; do - build "sim-${arch}" iphonesimulator "-arch ${arch} -mios-simulator-version-min=2.0" \ + build "sim-${arch}" iphonesimulator "-arch ${arch} -mios-simulator-version-min=4.0" \ OBJCXXFLAGS="-fobjc-abi-version=2 -fobjc-legacy-dispatch" \ CPPFLAGS="-I../libffi.${arch}/include" \ LDFLAGS="-L.." \ --disable-console done -for arch in armv6 armv7 armv7s; do - if [[ ${arch} == armv6 ]]; then - sdk=iphoneos5.1 - flg=() - else - sdk=iphoneos +for arch in armv6 armv7 armv7s arm64; do + cpf="-I../libffi.${arch}/include" + ldf="-L.." + + if [[ ${arch} != armv6 ]]; then flg=(--disable-console) + else + flg=(LTLIBAPR="../sysroot.ios/usr/lib/libapr-1.dylib") + cpf+=" -I../sysroot.ios/usr/include -I../sysroot.ios/usr/include/apr-1" + ldf+=" -L../sysroot.ios/usr/lib" fi - build "ios-${arch}" "${sdk}" "-arch ${arch} -miphoneos-version-min=2.0" --host=arm-apple-darwin10 \ - CPPFLAGS="-I../libffi.${arch}/include -I../sysroot.ios/usr/include -I../sysroot.ios/usr/include/apr-1" \ - LDFLAGS="-L.. -L../sysroot.ios/usr/lib" \ - LTLIBAPR="../sysroot.ios/usr/lib/libapr-1.dylib" \ - "${flg[@]}" + build "ios-${arch}" iphoneos "-arch ${arch} -miphoneos-version-min=2.0" --host=arm-apple-darwin10 \ + CPPFLAGS="${cpf}" LDFLAGS="${ldf}" "${flg[@]}" --host=arm-apple-darwin10 done