xcode 4.6/ios6 support

Conflicts:

	submodules/linphone
This commit is contained in:
Jehan Monnier 2012-09-18 10:32:00 +02:00
parent 840942ca3a
commit 20ef4a2469
8 changed files with 141 additions and 22 deletions

2
README
View file

@ -52,6 +52,8 @@ BUILDING THE SDK
$ cd submodules/build
$ make all enable_gpl_third_parties=no
xcode 4.5i/ios6 beta do:
$ make -f Makefile.ios6-beta
* ZRTP support
You can enable ZRTP support in GPL mode only, by adding "enable_zrtp=yes" to the make command, for example:

View file

@ -54,28 +54,28 @@ endif
LINPHONE_OPTIONS=enable_gpl_third_parties=$(enable_gpl_third_parties) enable_zrtp=$(enable_zrtp)
build:
make -f builder-iphone-os.mk $(LINPHONE_OPTIONS) all \
make -f builder-iphone-os.mk host=armv6-apple-darwin $(LINPHONE_OPTIONS) all \
&& make -f builder-iphone-simulator.mk $(LINPHONE_OPTIONS) all \
&& make -f builder-iphone-os.mk host=armv7-apple-darwin $(LINPHONE_OPTIONS) all \
&& make -f builder-iphone-os.mk delivery-sdk
ipa: build
make -f builder-iphone-simulator.mk ipa \
&& make -f builder-iphone-os.mk ipa \
&& make -f builder-iphone-os.mk host=armv6-apple-darwin ipa \
&& make -f builder-iphone-os.mk host=armv7-apple-darwin ipa
clean:
make -f builder-iphone-simulator.mk clean \
&& make -f builder-iphone-os.mk clean \
&& make -f builder-iphone-os.mk host=armv6-apple-darwin clean \
&& make -f builder-iphone-os.mk host=armv7-apple-darwin clean
clean-makefile:
make -f builder-iphone-simulator.mk clean-makefile \
&& make -f builder-iphone-os.mk clean-makefile \
&& make -f builder-iphone-os.mk host=armv6-apple-darwin clean-makefile \
&& make -f builder-iphone-os.mk host=armv7-apple-darwin clean-makefile
veryclean:
make -f builder-iphone-simulator.mk veryclean \
&& make -f builder-iphone-os.mk veryclean \
&& make -f builder-iphone-os.mk host=armv6-apple-darwin veryclean \
&& make -f builder-iphone-os.mk host=armv7-apple-darwin veryclean

View file

@ -0,0 +1,81 @@
############################################################################
# Makefile
# Copyright (C) 2009 Belledonne Communications,Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
enable_gpl_third_parties=yes
enable_zrtp=no
.NOTPARALLEL all: check_options build warning
ifeq ($(enable_gpl_third_parties)$(enable_zrtp),noyes)
check_options:
@echo "ZRTP is not available in non-gpl build."
@exit -1
else
check_options:
endif
ifeq ($(enable_gpl_third_parties),yes)
warning:
@echo
@echo "*****************************************************************"
@echo "*****************************************************************"
@echo "*****CAUTION, this liblinphone SDK is built using GPL code ******"
@echo "*****To disable gpl code, use make enable_gpl_third_parties=no***"
@echo "*****************************************************************"
@echo "*****************************************************************"
else
warning:
@echo
@echo "*****************************************************************"
@echo "*****************************************************************"
@echo "*****linphone SDK without GPL code ******"
@echo "*****************************************************************"
@echo "*****************************************************************"
endif
LINPHONE_OPTIONS=enable_gpl_third_parties=$(enable_gpl_third_parties) enable_zrtp=$(enable_zrtp)
build:
make -f builder-iphone-simulator.mk $(LINPHONE_OPTIONS) all \
&& make -f builder-iphone-os.mk $(LINPHONE_OPTIONS) all \
&& make -f builder-iphone-os.mk host=armv7s-apple-darwin $(LINPHONE_OPTIONS) all \
&& make -f builder-iphone-os.mk delivery-sdk
ipa: build
make -f builder-iphone-simulator.mk ipa \
&& make -f builder-iphone-os.mk ipa \
&& make -f builder-iphone-os.mk host=armv7s-apple-darwin ipa \
clean:
make -f builder-iphone-simulator.mk clean \
&& make -f builder-iphone-os.mk clean \
&& make -f builder-iphone-os.mk host=armv7s-apple-darwin clean \
clean-makefile:
make -f builder-iphone-simulator.mk clean-makefile \
&& make -f builder-iphone-os.mk clean-makefile \
&& make -f builder-iphone-os.mk host=armv7s-apple-darwin clean-makefile \
veryclean:
make -f builder-iphone-simulator.mk veryclean \
&& make -f builder-iphone-os.mk veryclean \
&& make -f builder-iphone-os.mk host=armv7s-apple-darwin veryclean \

View file

@ -20,7 +20,7 @@
#
############################################################################
host?=armv6-apple-darwin
host?=armv7-apple-darwin
config_site:=iphone-config.site
library_mode:= --disable-shared --enable-static
linphone_configure_controls= \
@ -301,13 +301,17 @@ multi-arch:
cp -rf $(prefix)/include $(prefix)/../apple-darwin/. ; \
cp -rf $(prefix)/share $(prefix)/../apple-darwin/. ; \
for archive in $$arm_archives ; do \
i386_path=`echo $$archive | sed -e "s/armv6/i386/"` ;\
armv7_path=`echo $$archive | sed -e "s/armv6/armv7/"` ;\
destpath=`echo $$archive | sed -e "s/armv6-//"` ;\
i386_path=`echo $$archive | sed -e "s/armv7/i386/"` ;\
armv6_path=`echo $$archive | sed -e "s/armv7/armv6/"` ;\
if test ! -f "$$armv6_path"; then \
armv6_path= ; \
fi; \
armv7s_path=`echo $$archive | sed -e "s/armv7/armv7s/"` ;\
destpath=`echo $$archive | sed -e "s/armv7-//"` ;\
if test -f "$$i386_path"; then \
echo "Mixing $$archive and $$i386_path into $$destpath"; \
echo "Mixing $$archive into $$destpath"; \
mkdir -p `dirname $$destpath` ; \
lipo -create $$archive $$armv7_path $$i386_path -output $$destpath; \
lipo -create $$archive $$armv7s_path $$armv6_path $$i386_path -output $$destpath; \
else \
echo "WARNING: archive `basename $$archive` exists in arm tree but does not exists in i386 tree."; \
fi \

View file

@ -6,6 +6,8 @@ libvpx_configure_options=\
ifneq (,$(findstring armv6,$(host)))
libvpx_configure_options+= --target=armv6-darwin-gcc --cpu=arm1176jzf-s
else ifneq (,$(findstring armv7s,$(host)))
libvpx_configure_options+= --target=armv7s-darwin-gcc --cpu=cortex-a8
else ifneq (,$(findstring armv7,$(host)))
libvpx_configure_options+= --target=armv7-darwin-gcc --cpu=cortex-a8
else

View file

@ -1,5 +1,5 @@
diff --git a/build/make/configure.sh b/build/make/configure.sh
index 0426f92..24fa04e 100755
index 0426f92..d1f4760 100755
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -624,6 +624,9 @@ process_common_toolchain() {
@ -12,7 +12,7 @@ index 0426f92..24fa04e 100755
case ${toolchain} in
*-darwin8-*)
@@ -743,6 +746,14 @@ process_common_toolchain() {
@@ -743,9 +746,17 @@ process_common_toolchain() {
darwin*)
SDK_PATH=/Developer/Platforms/iPhoneOS.platform/Developer
TOOLCHAIN_PATH=${SDK_PATH}/usr/bin
@ -26,10 +26,17 @@ index 0426f92..24fa04e 100755
+ fi
CC=${TOOLCHAIN_PATH}/gcc
AR=${TOOLCHAIN_PATH}/ar
LD=${TOOLCHAIN_PATH}/arm-apple-darwin10-llvm-gcc-4.2
@@ -759,10 +770,10 @@ process_common_toolchain() {
- LD=${TOOLCHAIN_PATH}/arm-apple-darwin10-llvm-gcc-4.2
+ LD=${TOOLCHAIN_PATH}/ld
AS=${TOOLCHAIN_PATH}/as
STRIP=${TOOLCHAIN_PATH}/strip
NM=${TOOLCHAIN_PATH}/nm
@@ -757,12 +768,12 @@ process_common_toolchain() {
ASFLAGS="-version -arch ${tgt_isa} -g"
add_cflags -arch ${tgt_isa}
add_ldflags -arch_only ${tgt_isa}
- add_ldflags -arch_only ${tgt_isa}
+ add_ldflags -arch ${tgt_isa}
- add_cflags "-isysroot ${SDK_PATH}/SDKs/iPhoneOS5.0.sdk"
+ add_cflags "-isysroot $SDK_FULL_PATH"
@ -40,3 +47,23 @@ index 0426f92..24fa04e 100755
# Add the paths for the alternate libc
for d in usr/include; do
diff --git a/configure b/configure
index 6f20c6b..4638ea2 100755
--- a/configure
+++ b/configure
@@ -94,6 +94,7 @@ all_platforms="${all_platforms} iwmmxt-linux-gcc"
all_platforms="${all_platforms} iwmmxt2-linux-rvct"
all_platforms="${all_platforms} iwmmxt2-linux-gcc"
all_platforms="${all_platforms} armv7-darwin-gcc" #neon Cortex-A8
+all_platforms="${all_platforms} armv7s-darwin-gcc" #neon Cortex-A8
all_platforms="${all_platforms} armv7-linux-rvct" #neon Cortex-A8
all_platforms="${all_platforms} armv7-linux-gcc" #neon Cortex-A8
all_platforms="${all_platforms} armv7-none-rvct" #neon Cortex-A8
@@ -198,6 +199,7 @@ ARCH_EXT_LIST="
armv5te
armv6
armv7
+ armv7s
iwmmxt
iwmmxt2

View file

@ -18,16 +18,20 @@ elif test "${host_alias}" = "armv7-apple-darwin" ; then
PLATFORM=OS
CMAKE_OPTS="-DCMAKE_SYSTEM_PROCESSOR=arm"
MCPU="-mcpu=cortex-a8"
elif test "${host_alias}" = "armv7s-apple-darwin" ; then
ARCH=armv7s
PLATFORM=OS
CMAKE_OPTS="-DCMAKE_SYSTEM_PROCESSOR=arm"
else
echo "bad host ${host_alias} must be either i386-apple-darwin or armv6-apple-darwin"
exit
fi
echo "Loading config.site for iPhone platform=${PLATFORM} version=${SDK_VERSION}"
XCODE_ROOT=/Applications/Xcode.app
#new path with Xcode 4.3:
if test -d /Applications/Xcode.app/Contents/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs ; then
SDK_PATH_LIST=`ls -drt /Applications/Xcode.app/Contents/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs/iPhone${PLATFORM}*`
SDK_BIN_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/usr/bin
if test -d ${XCODE_ROOT}/Contents/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs ; then
SDK_PATH_LIST=`ls -drt ${XCODE_ROOT}/Contents/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs/iPhone${PLATFORM}*`
SDK_BIN_PATH=${XCODE_ROOT}/Contents/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/usr/bin
else
SDK_PATH_LIST=`ls -drt /Developer/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs/iPhone${PLATFORM}*`
SDK_BIN_PATH=/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/usr/bin
@ -44,5 +48,4 @@ AR=${SDK_BIN_PATH}/ar
RANLIB=${SDK_BIN_PATH}/ranlib
CPPFLAGS="-Dasm=__asm"
LDFLAGS="-Wl,-syslibroot,${SYSROOT_PATH} -framework CFNetwork"
OBJCFLAGS="-x objective-c -fexceptions -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch"

@ -1 +1 @@
Subproject commit cb0fe631e18ad86f37739afeef5c2d6c60231421
Subproject commit 296b5671ae42dbfbb28e1c30e8c79ecdbe60ebc5