From 63745b55fdb92c7f7439458975b16b628b8aecd7 Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Fri, 26 Aug 2011 18:41:46 +0200 Subject: [PATCH] Compilation chain for ZRTP (no implementation) --- .gitmodules | 3 ++ Classes/LinphoneUI/LinphoneManager.m | 4 ++- linphone.xcodeproj/project.pbxproj | 27 ++++++++++++++- submodules/build/Makefile | 6 ++-- submodules/build/builder-iphone-os.mk | 36 +++++++++++++++----- submodules/build/builders.d/srtp.mk | 30 ++++++++++++++++ submodules/build/builders.d/zrtp.mk | 22 ++++++++++++ submodules/build/iphone-config.site | 24 +++++++++++-- submodules/build/iphone-toolchain.cmake | 13 +++++++ submodules/build/iphone-toolchain.cmake.i386 | 13 +++++++ submodules/externals/zrtpcpp | 1 + submodules/linphone | 2 +- 12 files changed, 164 insertions(+), 17 deletions(-) create mode 100644 submodules/build/builders.d/srtp.mk create mode 100644 submodules/build/builders.d/zrtp.mk create mode 100644 submodules/build/iphone-toolchain.cmake create mode 100644 submodules/build/iphone-toolchain.cmake.i386 create mode 160000 submodules/externals/zrtpcpp diff --git a/.gitmodules b/.gitmodules index adcac5915..3bff82fba 100644 --- a/.gitmodules +++ b/.gitmodules @@ -25,3 +25,6 @@ [submodule "submodules/msamr"] path = submodules/msamr url = git://git.linphone.org/msamr.git +[submodule "submodules/externals/zrtpcpp"] + path = submodules/externals/zrtpcpp + url = git://github.com/wernerd/ZRTPCPP.git diff --git a/Classes/LinphoneUI/LinphoneManager.m b/Classes/LinphoneUI/LinphoneManager.m index 84beb8fd5..71f617f7c 100644 --- a/Classes/LinphoneUI/LinphoneManager.m +++ b/Classes/LinphoneUI/LinphoneManager.m @@ -644,6 +644,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach NSString* factoryConfig = [myBundle pathForResource:@"linphonerc"ofType:nil] ; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *confiFileName = [[paths objectAtIndex:0] stringByAppendingString:@"/.linphonerc"]; + NSString *zrtpSecretsFileName = [[paths objectAtIndex:0] stringByAppendingString:@"/zrtp_secrets"]; connectivity=none; signal(SIGPIPE, SIG_IGN); //log management @@ -670,7 +671,8 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach ,self); [[NSUserDefaults standardUserDefaults] synchronize];//sync before loading config - + + linphone_core_set_zrtp_secrets_file(theLinphoneCore, [zrtpSecretsFileName cStringUsingEncoding:[NSString defaultCStringEncoding]]); proxyReachability=SCNetworkReachabilityCreateWithName(nil, "linphone.org"); proxyReachabilityContext.info=self; diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index 5f286dc81..d7695a040 100755 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -85,6 +85,8 @@ 22F51EF6107FA66500F98953 /* untitled.plist in Resources */ = {isa = PBXBuildFile; fileRef = 22F51EF5107FA66500F98953 /* untitled.plist */; }; 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; 70571E1A13FABCB000CDD3C2 /* rootca.pem in Resources */ = {isa = PBXBuildFile; fileRef = 70571E1913FABCB000CDD3C2 /* rootca.pem */; }; + F0A486D91404FE53009EC0BE /* libsrtp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F0A486D71404FE53009EC0BE /* libsrtp.a */; }; + F0A486DA1404FE53009EC0BE /* libzrtpcpp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F0A486D81404FE53009EC0BE /* libzrtpcpp.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -393,10 +395,13 @@ 22F254801073D99800AC9B3F /* ringback.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = ringback.wav; path = "liblinphone-sdk/apple-darwin/share/sounds/linphone/ringback.wav"; sourceTree = ""; }; 22F51EF5107FA66500F98953 /* untitled.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = untitled.plist; sourceTree = ""; }; 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = main.m; sourceTree = ""; }; 32CA4F630368D1EE00C91783 /* linphone_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = linphone_Prefix.pch; sourceTree = ""; }; 70571E1913FABCB000CDD3C2 /* rootca.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = rootca.pem; path = Resources/rootca.pem; sourceTree = ""; }; 8D1107310486CEB800E47090 /* linphone-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "linphone-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; + F0A486D71404FE53009EC0BE /* libsrtp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libsrtp.a; path = "liblinphone-sdk/apple-darwin/lib/libsrtp.a"; sourceTree = ""; }; + F0A486D81404FE53009EC0BE /* libzrtpcpp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libzrtpcpp.a; path = "liblinphone-sdk/apple-darwin/lib/libzrtpcpp.a"; sourceTree = ""; }; + F0A486DB14050008009EC0BE /* libstdc++.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libstdc++.dylib"; path = "usr/lib/gcc/arm-apple-darwin10/4.0.1/libstdc++.dylib"; sourceTree = SDKROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -429,6 +434,8 @@ 226F2ED61344B0EF00F6EF27 /* libopencore-amrwb.a in Frameworks */, 226F2ED71344B0EF00F6EF27 /* libopencore-amrnb.a in Frameworks */, 226F2ED81344B0EF00F6EF27 /* libmsamr.a in Frameworks */, + F0A486D91404FE53009EC0BE /* libsrtp.a in Frameworks */, + F0A486DA1404FE53009EC0BE /* libzrtpcpp.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -784,6 +791,9 @@ 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( + F0A486DB14050008009EC0BE /* libstdc++.dylib */, + F0A486D71404FE53009EC0BE /* libsrtp.a */, + F0A486D81404FE53009EC0BE /* libzrtpcpp.a */, 2214783B1386A2030020F8B8 /* Localizable.strings */, 22A10D9E11F88C1F00373793 /* liblinphone.xcodeproj */, 223148E51178A09900637D6A /* libmsilbc.a */, @@ -1042,6 +1052,9 @@ submodules/externals/osip/include, submodules/externals/exosip/include, submodules/externals/speex/include, + submodules/externals/srtp/include, + submodules/externals/srtp/crypto/include, + submodules/externals/zrtpcpp/src, ); INFOPLIST_FILE = "linphone-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 3.1; @@ -1055,6 +1068,8 @@ linphone, "-l", mediastreamer, + "-l", + srtp, ); PRODUCT_NAME = linphone; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; @@ -1104,6 +1119,9 @@ submodules/externals/osip/include, submodules/externals/exosip/include, submodules/externals/speex/include, + submodules/externals/srtp/include, + submodules/externals/srtp/crypto/include, + submodules/externals/zrtpcpp/src, ); INFOPLIST_FILE = "linphone-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 3.1; @@ -1117,6 +1135,8 @@ linphone, "-l", mediastreamer, + "-l", + srtp, ); PRODUCT_NAME = linphone; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; @@ -1166,6 +1186,9 @@ submodules/externals/osip/include, submodules/externals/exosip/include, submodules/externals/speex/include, + submodules/externals/srtp/include, + submodules/externals/srtp/crypto/include, + submodules/externals/zrtpcpp/src, ); INFOPLIST_FILE = "linphone-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 3.1; @@ -1179,6 +1202,8 @@ linphone, "-l", mediastreamer, + "-l", + srtp, ); PRODUCT_NAME = linphone; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; diff --git a/submodules/build/Makefile b/submodules/build/Makefile index 9c2e11552..ee0e90abe 100644 --- a/submodules/build/Makefile +++ b/submodules/build/Makefile @@ -20,9 +20,9 @@ # ############################################################################ all: - make -f builder-iphone-simulator.mk all \ - && make -f builder-iphone-os.mk all \ - && make -f builder-iphone-os.mk host=armv7-apple-darwin all \ + make -f builder-iphone-os.mk all \ + && make -f builder-iphone-simulator.mk tc_proc=.i386 all \ + && make -f builder-iphone-os.mk host=armv7-apple-darwin all \ && make -f builder-iphone-os.mk delivery-sdk clean: make -f builder-iphone-simulator.mk clean \ diff --git a/submodules/build/builder-iphone-os.mk b/submodules/build/builder-iphone-os.mk index 0d65d3620..94bf1db18 100644 --- a/submodules/build/builder-iphone-os.mk +++ b/submodules/build/builder-iphone-os.mk @@ -21,6 +21,7 @@ ############################################################################ host?=armv6-apple-darwin +enable_zrtp=no config_site:=iphone-config.site library_mode:= --disable-shared --enable-static linphone_configure_controls= --disable-video \ @@ -28,18 +29,25 @@ linphone_configure_controls= --disable-video \ --disable-nls \ --with-readline=none \ --enable-gtk_ui=no \ + --enable-console_ui=no \ --enable-ssl-hmac=no \ --enable-ssl=yes \ --enable-macaqsnd=no \ --enable-macsnd=no \ --enable-iounit=yes \ --with-gsm=$(prefix) \ + LIBZRTPCPP_CFLAGS="-I$(prefix)/include" \ + LIBZRTPCPP_LIBS="-L$(prefix)/lib -lzrtpcpp -lcrypto" \ SPEEX_CFLAGS="-I$(prefix)/include" \ SPEEXDSP_CFLAGS="-I$(prefix)/include" \ SPEEXDSP_LIBS="-L$(prefix)/lib -lspeexdsp" \ SPEEX_LIBS="-L$(prefix)/lib -lspeexdsp -lspeex " \ OPENSSL_CFLAGS="-I$(prefix)/include" \ OPENSSL_LIBS="-L$(prefix)/lib -lssl -lcrypto" +#ifeq ($(enable_zrtp),"yes") + linphone_configure_controls+= --with-srtp=$(prefix) --enable-zrtp=yes --disable-tests +#endif + #path BUILDER_SRC_DIR?=$(shell pwd)/../ @@ -56,6 +64,10 @@ speex_dir?=externals/speex gsm_dir?=externals/gsm +srtp_dir?=externals/srtp + +zrtpcpp_dir?=externals/zrtpcpp + MSILBC_SRC_DIR:=$(BUILDER_SRC_DIR)/msilbc MSILBC_BUILD_DIR:=$(BUILDER_BUILD_DIR)/msilbc @@ -82,25 +94,28 @@ init: veryclean: veryclean-linphone rm -rf $(BUILDER_BUILD_DIR) -.NOTPARALLEL build-linphone: init build-openssl build-osip2 build-eXosip2 build-speex build-libgsm $(LINPHONE_BUILD_DIR)/Makefile +.NOTPARALLEL build-linphone: init build-openssl build-srtp build-zrtpcpp build-osip2 build-eXosip2 build-speex build-libgsm $(LINPHONE_BUILD_DIR)/Makefile cd $(LINPHONE_BUILD_DIR) && export PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig export CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make newdate && make && make install -clean-linphone: clean-osip2 clean-eXosip2 clean-speex clean-libgsm clean-msilbc clean-libilbc clean-openssl clean-msamr +clean-linphone: clean-osip2 clean-eXosip2 clean-speex clean-libgsm clean-srtp clean-zrtpcpp clean-msilbc clean-libilbc clean-openssl clean-msamr cd $(LINPHONE_BUILD_DIR) && make clean -veryclean-linphone: veryclean-osip2 veryclean-eXosip2 veryclean-speex veryclean-libgsm veryclean-msilbc veryclean-libilbc veryclean-openssl veryclean-msamr +veryclean-linphone: veryclean-osip2 veryclean-eXosip2 veryclean-speex veryclean-srtp veryclean-libgsm veryclean-msilbc veryclean-libilbc veryclean-openssl veryclean-msamr #-cd $(LINPHONE_BUILD_DIR) && make distclean -cd $(LINPHONE_SRC_DIR) && rm -f configure -clean-makefile-linphone: clean-makefile-osip2 clean-makefile-eXosip2 clean-makefile-speex clean-makefile-libilbc clean-makefile-msilbc clean-makefile-openssl clean-makefile-msamr +clean-makefile-linphone: clean-makefile-osip2 clean-makefile-eXosip2 clean-makefile-speex clean-makefile-srtp clean-makefile-zrtpcpp clean-makefile-libilbc clean-makefile-msilbc clean-makefile-openssl clean-makefile-msamr cd $(LINPHONE_BUILD_DIR) && rm -f Makefile && rm -f oRTP/Makefile && rm -f mediastreamer2/Makefile -$(LINPHONE_SRC_DIR)/configure: +$(LINPHONE_SRC_DIR)/configure: build-srtp cd $(LINPHONE_SRC_DIR) && ./autogen.sh $(LINPHONE_BUILD_DIR)/Makefile: $(LINPHONE_SRC_DIR)/configure mkdir -p $(LINPHONE_BUILD_DIR) + echo -e "\033[1mPKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \ + $(LINPHONE_SRC_DIR)/configure -prefix=$(prefix) --host=$(host) ${library_mode} \ + ${linphone_configure_controls}\033[0m" cd $(LINPHONE_BUILD_DIR) && \ PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \ $(LINPHONE_SRC_DIR)/configure -prefix=$(prefix) --host=$(host) ${library_mode} \ @@ -177,18 +192,19 @@ $(BUILDER_BUILD_DIR)/$(speex_dir)/Makefile: $(BUILDER_SRC_DIR)/$(speex_dir)/conf $(BUILDER_SRC_DIR)/$(speex_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode} --disable-oggtest $(SPEEX_CONFIGURE_OPTION) build-speex: $(BUILDER_BUILD_DIR)/$(speex_dir)/Makefile - cd $(BUILDER_BUILD_DIR)/$(speex_dir)/libspeex && make && make install - cd $(BUILDER_BUILD_DIR)/$(speex_dir)/include && make && make install + cd $(BUILDER_BUILD_DIR)/$(speex_dir)/libspeex && make && make install + cd $(BUILDER_BUILD_DIR)/$(speex_dir)/include && make && make install clean-speex: - cd $(BUILDER_BUILD_DIR)/$(speex_dir) && make clean + cd $(BUILDER_BUILD_DIR)/$(speex_dir) && make clean veryclean-speex: # -cd $(BUILDER_BUILD_DIR)/$(speex_dir) && make distclean -rm -f $(BUILDER_SRC_DIR)/$(speex_dir)/configure clean-makefile-speex: - cd $(BUILDER_BUILD_DIR)/$(speex_dir) && rm -f Makefile + cd $(BUILDER_BUILD_DIR)/$(speex_dir) && rm -f Makefile + #GSM @@ -260,6 +276,8 @@ clean-makefile-libilbc: cd $(LIBILBC_BUILD_DIR) && rm -f Makefile #openssl +#srtp +#zrtp include builders.d/*.mk #sdk generation and distribution diff --git a/submodules/build/builders.d/srtp.mk b/submodules/build/builders.d/srtp.mk new file mode 100644 index 000000000..823892ce5 --- /dev/null +++ b/submodules/build/builders.d/srtp.mk @@ -0,0 +1,30 @@ +srtp_version?="1.4.2" +srtp_url?="http://srtp.sourceforge.net/srtp-$(srtp_version).tgz" + + +$(BUILDER_SRC_DIR)/$(srtp_dir)/configure: + cd $(BUILDER_SRC_DIR)/externals \ + && wget $(stp_url) \ + && tar zxvf srtp-$(srtp_version).tgz + +$(BUILDER_BUILD_DIR)/$(srtp_dir)/Makefile: $(BUILDER_SRC_DIR)/$(srtp_dir)/configure + mkdir -p $(BUILDER_BUILD_DIR)/$(srtp_dir) + cd $(BUILDER_BUILD_DIR)/$(srtp_dir)/\ + && CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \ + $(BUILDER_SRC_DIR)/$(srtp_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode} + +build-srtp: $(BUILDER_BUILD_DIR)/$(srtp_dir)/Makefile + cp -rf $(BUILDER_SRC_DIR)/$(srtp_dir)/include $(BUILDER_BUILD_DIR)/$(srtp_dir) + cp -rf $(BUILDER_SRC_DIR)/$(srtp_dir)/crypto/include $(BUILDER_BUILD_DIR)/$(srtp_dir) + -cd $(BUILDER_BUILD_DIR)/$(srtp_dir) && make uninstall + cd $(BUILDER_BUILD_DIR)/$(srtp_dir) && make libsrtp.a && make install + +clean-srtp: + cd $(BUILDER_BUILD_DIR)/$(srtp_dir) && make clean + +veryclean-srtp: + -cd $(BUILDER_BUILD_DIR)/$(srtp_dir) && make distclean + +clean-makefile-srtp: + cd $(BUILDER_BUILD_DIR)/$(srtp_dir) && rm -f Makefile + diff --git a/submodules/build/builders.d/zrtp.mk b/submodules/build/builders.d/zrtp.mk new file mode 100644 index 000000000..68912425b --- /dev/null +++ b/submodules/build/builders.d/zrtp.mk @@ -0,0 +1,22 @@ +#I coudn't manage to crosscompile using only -D arguments to cmake +#Thus the use of a toolchain file. +TC = -DCMAKE_TOOLCHAIN_FILE=$(BUILDER_SRC_DIR)build/iphone-toolchain.cmake$(tc_proc) +$(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)/Makefile: + mkdir -p $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir) + cd $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)/\ + && host_alias=$(host) . $(BUILDER_SRC_DIR)/build/$(config_site) \ + && cmake $(BUILDER_SRC_DIR)/$(zrtpcpp_dir) -Denable-ccrtp=false $(TC) -LH -Wdev -DCMAKE_INSTALL_PREFIX=$(prefix) -DCMAKE_FIND_ROOT_PATH="$(prefix)" +# Used toolchain: $(TC) + +build-zrtpcpp: $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)/Makefile build-openssl + echo "Build ZRTP - prefix $(prefix)" + cd $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir) && make && make install + +clean-zrtpcpp: + -cd $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir) && make clean + +clean-makefile-zrtpcpp: clean-zrtpcpp + -rm -f $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)/Makefile + -rm -f $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)/CMakeCache.txt + + diff --git a/submodules/build/iphone-config.site b/submodules/build/iphone-config.site index fb13cfd87..039fa76b7 100644 --- a/submodules/build/iphone-config.site +++ b/submodules/build/iphone-config.site @@ -7,12 +7,15 @@ SDK_VERSION=4.0 if test "${host_alias}" = "i386-apple-darwin" ; then PLATFORM=Simulator ARCH=i386 + CMAKE_OPTS="-DCMAKE_SYSTEM_PROCESSOR=i386" elif test "${host_alias}" = "armv6-apple-darwin" ; then ARCH=armv6 PLATFORM=OS + CMAKE_OPTS="-DCMAKE_SYSTEM_PROCESSOR=arm" elif test "${host_alias}" = "armv7-apple-darwin" ; then ARCH=armv7 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 @@ -23,11 +26,28 @@ SDK_PATH_LIST=`ls -drt /Developer/Platforms/iPhone${PLATFORM}.platform/Developer SDK_BIN_PATH=/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/usr/bin for SYSROOT_PATH in $SDK_PATH_LIST ; do echo $SYSROOT_PATH ; done ; echo "Selecting SDK path = ${SYSROOT_PATH}" -CC="${SDK_BIN_PATH}/gcc-${GCC_VERSION} -std=c99 -arch ${ARCH} -isysroot ${SYSROOT_PATH} -miphoneos-version-min=${SDK_VERSION} -DTARGET_OS_IPHONE" -CXX="${SDK_BIN_PATH}/g++-${GCC_VERSION} -arch ${ARCH} -isysroot ${SYSROOT_PATH} -miphoneos-version-min=${SDK_VERSION} -DTARGET_OS_IPHONE" +COMMON_FLAGS=" -arch ${ARCH} -isysroot ${SYSROOT_PATH} -miphoneos-version-min=${SDK_VERSION} -DTARGET_OS_IPHONE" +CC="${SDK_BIN_PATH}/gcc-${GCC_VERSION} -std=c99 $COMMON_FLAGS" +CXX="${SDK_BIN_PATH}/g++-${GCC_VERSION} $COMMON_FLAGS" LD="${SDK_BIN_PATH}/ld-${GCC_VERSION} -arch ${ARCH}" AR=${SDK_BIN_PATH}/ar RANLIB=${SDK_BIN_PATH}/ranlib CPPFLAGS="-Dasm=__asm" LDFLAGS="-Wl,-syslibroot,${SYSROOT_PATH} -framework CFNetwork" + +export CC CXX LD CFLAGS="${COMMON_FLAGS} ${CFLAGS}" CXXFLAGS="${COMMON_FLAG} ${CPPFLAGS}" CPPFLAGS="${COMMON_FLAG} ${CPPFLAGS}" LDFLAGS="${LDFLAGS} ${COMMON_FLAGS}" + +# CMAKE options (not working right now so information duplicated in .cmake toolchains). +DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer +SDKVER=4.3 +export CMAKE_OPTS="${CMAKE_OPTS} \ + -DCMAKE_SYSTEM_NAME=Generic \ + -DSDKVER=${SDKVER} \ + -DDEVROOT=${DEVROOT} \ + -DSDKROOT=${DEVROOT}/SDKs/iPhoneOS${SDKVER}.sdk \ + -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ + -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ + -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ + " + diff --git a/submodules/build/iphone-toolchain.cmake b/submodules/build/iphone-toolchain.cmake new file mode 100644 index 000000000..7f46ad8bb --- /dev/null +++ b/submodules/build/iphone-toolchain.cmake @@ -0,0 +1,13 @@ +SET (CMAKE_SYSTEM_NAME "Generic") +SET (CMAKE_SYSTEM_PROCESSOR "arm") + +SET (SDKVER "4.3") +SET (DEVROOT "/Developer/Platforms/iPhoneOS.platform/Developer") +SET (SDKROOT "${DEVROOT}/SDKs/iPhoneOS${SDKVER}.sdk") + +SET (CMAKE_FIND_ROOT_PATH "${CMAKE_INSTALL_PREFIX}" "${SDKROOT}" "${DEVROOT}") +SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + + diff --git a/submodules/build/iphone-toolchain.cmake.i386 b/submodules/build/iphone-toolchain.cmake.i386 new file mode 100644 index 000000000..0c7c1a5e5 --- /dev/null +++ b/submodules/build/iphone-toolchain.cmake.i386 @@ -0,0 +1,13 @@ +SET (CMAKE_SYSTEM_NAME "Generic") +SET (CMAKE_SYSTEM_PROCESSOR "i386") + +SET (SDKVER "4.3") +SET (DEVROOT "/Developer/Platforms/iPhoneOS.platform/Developer") +SET (SDKROOT "${DEVROOT}/SDKs/iPhoneOS${SDKVER}.sdk") + +SET (CMAKE_FIND_ROOT_PATH "${CMAKE_INSTALL_PREFIX}" "${SDKROOT}" "${DEVROOT}") +SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + + diff --git a/submodules/externals/zrtpcpp b/submodules/externals/zrtpcpp new file mode 160000 index 000000000..3cbbcf29f --- /dev/null +++ b/submodules/externals/zrtpcpp @@ -0,0 +1 @@ +Subproject commit 3cbbcf29f707adaaa00958c6e2c321e79a7b8e83 diff --git a/submodules/linphone b/submodules/linphone index e933e1eae..20709fc5f 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit e933e1eae12b7f533ce354e11c234b899e2576cf +Subproject commit 20709fc5f1b06c04f2311e1f6ec4ff45f76f4de8