mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Merge remote-tracking branch 'public/master' into dev_videoios
IOS migration Conflicts: .gitignore .gitmodules linphone-Info.plist linphone.xcodeproj/project.pbxproj submodules/build/builder-iphone-os.mk submodules/build/iphone-config.site submodules/externals/osip submodules/liblinphone.xcodeproj/project.pbxproj submodules/linphone
This commit is contained in:
commit
ddeaddf92d
30 changed files with 511 additions and 44 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,2 +1 @@
|
|||
build-*
|
||||
|
||||
|
|
|
|||
5
.gitmodules
vendored
5
.gitmodules
vendored
|
|
@ -3,7 +3,7 @@
|
|||
url = gitosis@git.linphone.org:linphone-private.git
|
||||
[submodule "submodules/externals/osip"]
|
||||
path = submodules/externals/osip
|
||||
url = git://git.savannah.gnu.org/osip.git
|
||||
url = git://git.linphone.org/osip.git
|
||||
[submodule "submodules/externals/exosip"]
|
||||
path = submodules/externals/exosip
|
||||
url = git://git.linphone.org/exosip.git
|
||||
|
|
@ -37,3 +37,6 @@
|
|||
[submodule "submodules/externals/libvpx"]
|
||||
path = submodules/externals/libvpx
|
||||
url = http://git.chromium.org/webm/libvpx.git
|
||||
[submodule "submodules/externals/zrtpcpp"]
|
||||
path = submodules/externals/zrtpcpp
|
||||
url = git://github.com/wernerd/ZRTPCPP.git
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ typedef enum _Connectivity {
|
|||
-(void) registerLogView:(id<LogView>) view;
|
||||
|
||||
-(void) startLibLinphone;
|
||||
-(BOOL) isNotIphone3G;
|
||||
-(void) destroyLibLinphone;
|
||||
|
||||
-(void) enterBackgroundMode;
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
#import <AVFoundation/AVAudioSession.h>
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
#import "FastAddressBook.h"
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
static LinphoneCore* theLinphoneCore=nil;
|
||||
static LinphoneManager* theLinphoneManager=nil;
|
||||
|
||||
|
|
@ -396,16 +398,17 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
if (linphone_core_get_sip_transports(theLinphoneCore, &transportValue)) {
|
||||
ms_error("cannot get current transport");
|
||||
}
|
||||
// Only one port can be set at one time, the others's value is 0
|
||||
if ([transport isEqualToString:@"tcp"]) {
|
||||
if (transportValue.tcp_port == 0) transportValue.tcp_port=transportValue.udp_port;
|
||||
if (transportValue.tcp_port == 0) transportValue.tcp_port=transportValue.udp_port + transportValue.tls_port;
|
||||
transportValue.udp_port=0;
|
||||
transportValue.tls_port=0;
|
||||
} else if ([transport isEqualToString:@"udp"]){
|
||||
if (transportValue.udp_port == 0) transportValue.udp_port=transportValue.tcp_port;
|
||||
if (transportValue.udp_port == 0) transportValue.udp_port=transportValue.tcp_port + transportValue.tls_port;
|
||||
transportValue.tcp_port=0;
|
||||
transportValue.tls_port=0;
|
||||
} else if ([transport isEqualToString:@"tls"]){
|
||||
if (transportValue.tls_port == 0) transportValue.tls_port=transportValue.udp_port;
|
||||
if (transportValue.tls_port == 0) transportValue.tls_port=transportValue.udp_port + transportValue.tcp_port;
|
||||
transportValue.tcp_port=0;
|
||||
transportValue.udp_port=0;
|
||||
} else {
|
||||
|
|
@ -513,8 +516,14 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
}
|
||||
|
||||
//read codecs from setting bundle and enable them one by one
|
||||
[self configurePayloadType:"speex" fromPrefKey:@"speex_16k_preference" withRate:16000];
|
||||
[self configurePayloadType:"speex" fromPrefKey:@"speex_8k_preference" withRate:8000];
|
||||
if ([self isNotIphone3G]) {
|
||||
[self configurePayloadType:"speex" fromPrefKey:@"speex_16k_preference" withRate:16000];
|
||||
[self configurePayloadType:"speex" fromPrefKey:@"speex_8k_preference" withRate:8000];
|
||||
}
|
||||
else
|
||||
{
|
||||
ms_message("SPEEX codecs deactivated");
|
||||
}
|
||||
[self configurePayloadType:"AMR" fromPrefKey:@"amr_8k_preference" withRate:8000];
|
||||
[self configurePayloadType:"GSM" fromPrefKey:@"gsm_8k_preference" withRate:8000];
|
||||
[self configurePayloadType:"iLBC" fromPrefKey:@"ilbc_preference" withRate:8000];
|
||||
|
|
@ -546,6 +555,18 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
}
|
||||
|
||||
}
|
||||
- (BOOL)isNotIphone3G
|
||||
{
|
||||
size_t size;
|
||||
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
|
||||
char *machine = malloc(size);
|
||||
sysctlbyname("hw.machine", machine, &size, NULL, 0);
|
||||
NSString *platform = [NSString stringWithCString:machine];
|
||||
free(machine);
|
||||
|
||||
return ![platform isEqualToString:@"iPhone1,2"];
|
||||
}
|
||||
|
||||
// no proxy configured alert
|
||||
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
|
||||
if (buttonIndex == 1) {
|
||||
|
|
@ -674,6 +695,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
|
||||
|
|
@ -702,7 +724,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;
|
||||
|
|
|
|||
1
README
1
README
|
|
@ -8,6 +8,7 @@ Linphone for iPhone depends on liblinphone sdk. To build this sdk, you must inst
|
|||
-intltool
|
||||
-wget
|
||||
-pkgconfig
|
||||
-cmake (for ZRTP support)
|
||||
|
||||
|
||||
gas-preprosessor.pl (http://github.com/yuvi/gas-preprocessor/ ) to be copied into /opt/local/bin
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ nortp_timeout=30
|
|||
|
||||
[sound]
|
||||
playback_dev_id=AU: Audio Unit Receiver
|
||||
ringer_dev_id=AU: Audio Unit Speaker
|
||||
ringer_dev_id=AQ: Audio Queue Device
|
||||
capture_dev_id=AU: Audio Unit Receiver
|
||||
echocancellation=0
|
||||
|
||||
|
|
@ -37,4 +37,4 @@ display=1
|
|||
capture=1
|
||||
show_local=0
|
||||
enabled=1
|
||||
size=ios-medium
|
||||
size=ios-medium
|
||||
|
|
|
|||
|
|
@ -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 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 \
|
||||
|
|
|
|||
|
|
@ -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= \
|
||||
|
|
@ -28,13 +29,17 @@ linphone_configure_controls= \
|
|||
--disable-nls \
|
||||
--with-readline=none \
|
||||
--enable-gtk_ui=no \
|
||||
--enable-console_ui=no \
|
||||
--enable-console_ui=no \
|
||||
--enable-ssl-hmac=no \
|
||||
--enable-ssl=yes \
|
||||
--disable-theora \
|
||||
--disable-sdl \
|
||||
--disable-x11 \
|
||||
--with-gsm=$(prefix) \
|
||||
--disable-tests \
|
||||
LIBZRTPCPP_CFLAGS="-I$(prefix)/include" \
|
||||
LIBZRTPCPP_LIBS="-L$(prefix)/lib -lzrtpcpp -lcrypto" \
|
||||
SRTP_LIBS="-L$(prefix)/lib -lsrtp -lcrypto" \
|
||||
--enable-vp8 \
|
||||
SPEEX_CFLAGS="-I$(prefix)/include" \
|
||||
SPEEXDSP_CFLAGS="-I$(prefix)/include" \
|
||||
|
|
@ -42,6 +47,10 @@ linphone_configure_controls= \
|
|||
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)/../
|
||||
|
|
@ -58,6 +67,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
|
||||
|
||||
|
|
@ -67,7 +80,6 @@ LIBILBC_BUILD_DIR:=$(BUILDER_BUILD_DIR)/libilbc-rfc3951
|
|||
ifneq (,$(findstring arm,$(host)))
|
||||
SPEEX_CONFIGURE_OPTION := --enable-fixed-point --disable-float-api
|
||||
#SPEEX_CONFIGURE_OPTION := --enable-arm5e-asm --enable-fixed-point
|
||||
else
|
||||
endif
|
||||
|
||||
|
||||
|
|
@ -84,17 +96,17 @@ init:
|
|||
veryclean: veryclean-linphone
|
||||
rm -rf $(BUILDER_BUILD_DIR)
|
||||
|
||||
.NOTPARALLEL build-linphone: init build-openssl build-osip2 build-eXosip2 build-speex build-libgsm build-ffmpeg build-libvpx $(LINPHONE_BUILD_DIR)/Makefile
|
||||
.NOTPARALLEL build-linphone: init build-openssl build-srtp build-zrtpcpp build-osip2 build-eXosip2 build-speex build-libgsm build-ffmpeg build-libvpx $(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-ffmpeg clean-libvpx clean-msx264
|
||||
clean-linphone: clean-osip2 clean-eXosip2 clean-speex clean-libgsm clean-srtp clean-zrtpcpp clean-msilbc clean-libilbc clean-openssl clean-msamr clean-ffmpeg clean-libvpx clean-msx264
|
||||
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-msx264
|
||||
veryclean-linphone: veryclean-osip2 veryclean-eXosip2 veryclean-speex veryclean-srtp veryclean-zrtpcpp veryclean-libgsm veryclean-msilbc veryclean-libilbc veryclean-openssl veryclean-msamr veryclean-msx264
|
||||
#-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-ffmpeg clean-makefile-libvpx
|
||||
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 clean-makefile-ffmpeg clean-makefile-libvpx
|
||||
cd $(LINPHONE_BUILD_DIR) && rm -f Makefile && rm -f oRTP/Makefile && rm -f mediastreamer2/Makefile
|
||||
|
||||
|
||||
|
|
@ -103,6 +115,9 @@ $(LINPHONE_SRC_DIR)/configure:
|
|||
|
||||
$(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} \
|
||||
|
|
@ -179,18 +194,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
|
||||
|
||||
|
|
@ -262,6 +278,8 @@ clean-makefile-libilbc:
|
|||
cd $(LIBILBC_BUILD_DIR) && rm -f Makefile
|
||||
|
||||
#openssl
|
||||
#srtp
|
||||
#zrtp
|
||||
include builders.d/*.mk
|
||||
#sdk generation and distribution
|
||||
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ ffmpeg_configure_options=\
|
|||
--disable-everything --enable-decoder=mjpeg --enable-encoder=mjpeg --enable-decoder=mpeg4 --enable-encoder=mpeg4 \
|
||||
--enable-decoder=h264 --disable-avformat --enable-armv5te --enable-armv6 --enable-armv6t2 \
|
||||
--enable-armvfp \
|
||||
--source-path=$(BUILDER_SRC_DIR)/$(ffmpeg_dir) \
|
||||
--cross-prefix=$$SDK_BIN_PATH/ \
|
||||
--sysroot=$$SYSROOT_PATH --arch=$$ARCH \
|
||||
--enable-static --disable-shared --target-os=darwin \
|
||||
--extra-cflags="-arch $$ARCH " --extra-ldflags="-arch $$ARCH -Wl,-syslibroot,$$SYSROOT_PATH " \
|
||||
--source-path=$(BUILDER_SRC_DIR)/$(ffmpeg_dir)
|
||||
# --as=$(BUILDER_SRC_DIR)/externals/x264/extras/gas-preprocessor.pl
|
||||
|
||||
#--sysinclude=PATH location of cross-build system headers
|
||||
|
|
@ -22,8 +22,12 @@ ifneq (,$(findstring armv7,$(host)))
|
|||
ffmpeg_configure_options+= --enable-neon --cpu=cortex-a8
|
||||
endif
|
||||
ffmpeg_dir?=externals/ffmpeg
|
||||
|
||||
$(BUILDER_BUILD_DIR)/$(ffmpeg_dir)/config.mak:
|
||||
$(BUILDER_SRC_DIR)/$(ffmpeg_dir)/patched :
|
||||
cd $(BUILDER_SRC_DIR)/$(ffmpeg_dir) \
|
||||
&& git apply $(BUILDER_SRC_DIR)/build/builders.d/ffmpeg.patch \
|
||||
&& touch $(BUILDER_SRC_DIR)/$(ffmpeg_dir)/patched
|
||||
|
||||
$(BUILDER_BUILD_DIR)/$(ffmpeg_dir)/config.mak: $(BUILDER_SRC_DIR)/$(ffmpeg_dir)/patched
|
||||
mkdir -p $(BUILDER_BUILD_DIR)/$(ffmpeg_dir)
|
||||
cd $(BUILDER_BUILD_DIR)/$(ffmpeg_dir)/ \
|
||||
&& host_alias=${host} . $(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
|
|
|
|||
20
submodules/build/builders.d/ffmpeg.patch
Normal file
20
submodules/build/builders.d/ffmpeg.patch
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
diff --git a/libavutil/arm/intmath.h b/libavutil/arm/intmath.h
|
||||
index 8f03d4b..0504b95 100644
|
||||
--- a/libavutil/arm/intmath.h
|
||||
+++ b/libavutil/arm/intmath.h
|
||||
@@ -91,10 +91,12 @@ static av_always_inline av_const int FASTDIV(int a, int b)
|
||||
static av_always_inline av_const int32_t av_clipl_int32_arm(int64_t a)
|
||||
{
|
||||
int x, y;
|
||||
- __asm__ volatile ("adds %1, %R2, %Q2, lsr #31 \n\t"
|
||||
+ union { uint64_t a; uint32_t hl[2]; } tmp_a;
|
||||
+ tmp_a.a=a;
|
||||
+ __asm__ volatile ("adds %1, %2, %3, lsr #31 \n\t"
|
||||
"mvnne %1, #1<<31 \n\t"
|
||||
- "eorne %0, %1, %R2, asr #31 \n\t"
|
||||
- : "=r"(x), "=&r"(y) : "r"(a));
|
||||
+ "eorne %0, %1, %2, asr #31 \n\t"
|
||||
+ : "=r"(x), "=&r"(y) : "r"(tmp_a.hl[0]),"r"(tmp_a.hl[1]));
|
||||
return x;
|
||||
}
|
||||
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
libvpx_configure_options=\
|
||||
--enable-static --disable-shared\
|
||||
# --extra-cflags="-arch $$ARCH"
|
||||
--enable-static --disable-shared \
|
||||
--disable-examples
|
||||
# --extra-cflags="-isysroot $$SYSROOT_PATH "
|
||||
# -Wl,-syslibroot,$$SYSROOT_PATH " \
|
||||
--enable-error-concealment --disable-examples
|
||||
|
||||
|
|
@ -12,12 +13,16 @@ else
|
|||
libvpx_configure_options+= --force-target=x86-darwin10-gcc
|
||||
endif
|
||||
libvpx_dir?=externals/libvpx
|
||||
$(BUILDER_SRC_DIR)/$(libvpx_dir)/patched :
|
||||
cd $(BUILDER_SRC_DIR)/$(libvpx_dir) \
|
||||
&& git apply $(BUILDER_SRC_DIR)/build/builders.d/libvpx.patch \
|
||||
&& touch $(BUILDER_SRC_DIR)/$(libvpx_dir)/patched
|
||||
|
||||
$(BUILDER_BUILD_DIR)/$(libvpx_dir)/config.mak:
|
||||
$(BUILDER_BUILD_DIR)/$(libvpx_dir)/config.mak: $(BUILDER_SRC_DIR)/$(libvpx_dir)/patched
|
||||
mkdir -p $(BUILDER_BUILD_DIR)/$(libvpx_dir)
|
||||
cd $(BUILDER_BUILD_DIR)/$(libvpx_dir)/ \
|
||||
&& host_alias=${host} . $(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
&& $(BUILDER_SRC_DIR)/$(libvpx_dir)/configure --prefix=$(prefix) $(libvpx_configure_options)
|
||||
&& $(BUILDER_SRC_DIR)/$(libvpx_dir)/configure --prefix=$(prefix) $(libvpx_configure_options)
|
||||
|
||||
build-libvpx: $(BUILDER_BUILD_DIR)/$(libvpx_dir)/config.mak
|
||||
cd $(BUILDER_BUILD_DIR)/$(libvpx_dir) && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make && make install
|
||||
|
|
|
|||
25
submodules/build/builders.d/libvpx.patch
Normal file
25
submodules/build/builders.d/libvpx.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
diff --git a/build/make/configure.sh b/build/make/configure.sh
|
||||
index 009a6c4..1cd1ea8 100755
|
||||
--- a/build/make/configure.sh
|
||||
+++ b/build/make/configure.sh
|
||||
@@ -729,7 +729,7 @@ process_common_toolchain() {
|
||||
TOOLCHAIN_PATH=${SDK_PATH}/usr/bin
|
||||
CC=${TOOLCHAIN_PATH}/gcc
|
||||
AR=${TOOLCHAIN_PATH}/ar
|
||||
- LD=${TOOLCHAIN_PATH}/arm-apple-darwin10-gcc-4.2.1
|
||||
+ LD=${TOOLCHAIN_PATH}/gcc
|
||||
AS=${TOOLCHAIN_PATH}/as
|
||||
STRIP=${TOOLCHAIN_PATH}/strip
|
||||
NM=${TOOLCHAIN_PATH}/nm
|
||||
@@ -741,9 +741,9 @@ process_common_toolchain() {
|
||||
ASFLAGS="-version -arch ${tgt_isa} -g"
|
||||
|
||||
add_cflags -arch ${tgt_isa}
|
||||
- add_ldflags -arch_only ${tgt_isa}
|
||||
+ add_ldflags "-arch ${tgt_isa} -Wl,-syslibroot,${SDK_PATH}/SDKs/iPhoneOS5.0.sdk"
|
||||
|
||||
- add_cflags "-isysroot ${SDK_PATH}/SDKs/iPhoneOS4.3.sdk"
|
||||
+ add_cflags "-isysroot ${SDK_PATH}/SDKs/iPhoneOS5.0.sdk"
|
||||
|
||||
# This should be overridable
|
||||
alt_libc=${SDK_PATH}/SDKs/iPhoneOS4.3.sdk
|
||||
|
|
@ -14,7 +14,7 @@ $(OPENSSL_BUILD_DIR)/Configure:
|
|||
&& tar xvzf openssl-$(openssl_version).tar.gz \
|
||||
&& rm -f openssl-$(openssl_version).tar.gz \
|
||||
&& mv openssl-$(openssl_version) openssl \
|
||||
&& cd openssl && patch -p0 < $(BUILDER_SRC_DIR)/build/openssl.patch
|
||||
&& cd openssl && patch -p0 < $(BUILDER_SRC_DIR)/build/builders.d/openssl.patch
|
||||
|
||||
$(OPENSSL_BUILD_DIR)/Makefile: $(OPENSSL_BUILD_DIR)/Configure
|
||||
cd $(OPENSSL_BUILD_DIR) \
|
||||
|
|
|
|||
59
submodules/build/builders.d/silk.mk
Normal file
59
submodules/build/builders.d/silk.mk
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
############################################################################
|
||||
# silk.mk
|
||||
# Copyright (C) 2011 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.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
SILK_BUILD_DIR?=$(BUILDER_BUILD_DIR)/externals/silk
|
||||
|
||||
ifneq (,$(findstring i386,$(host)))
|
||||
make_options := TARGET_MTUNE=i386 TARGET_ARCH=i386
|
||||
endif
|
||||
ifneq (,$(findstring armv6,$(host)))
|
||||
make_options := TARGET_ARCH="-arch armv6"
|
||||
endif
|
||||
ifneq (,$(findstring armv7,$(host)))
|
||||
make_options := USE_NEON=yes TARGET_ARCH="armv7 -mno-thumb"
|
||||
endif
|
||||
|
||||
$(SILK_BUILD_DIR)/Makefile:
|
||||
mkdir -p $(BUILDER_BUILD_DIR)/externals \
|
||||
&& cd $(BUILDER_BUILD_DIR)/externals \
|
||||
&& rm -rf silk \
|
||||
&& wget http://developer.skype.com/silk/SILK_SDK_SRC_v1.0.8.zip \
|
||||
&& unzip SILK_SDK_SRC_v1.0.8.zip \
|
||||
&& rm -f SILK_SDK_SRC_v1.0.8.zip \
|
||||
&& mv SILK_SDK_SRC_v1.0.8/SILK_SDK_SRC_ARM_v1.0.8 silk \
|
||||
&& rm -rf SILK_SDK_SRC_v1.0.8
|
||||
|
||||
build-silk: $(SILK_BUILD_DIR)/Makefile
|
||||
cd $(SILK_BUILD_DIR) && host_alias=${host} . $(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
&& make all TOOLCHAIN_PREFIX=$$SDK_BIN_PATH/ $(make_options) ADDED_DEFINES+=IPHONE \
|
||||
&& mkdir -p $(prefix)/include/silk \
|
||||
&& cp -f $(SILK_BUILD_DIR)/interface/* $(prefix)/include/silk \
|
||||
&& cp -f lib*.a $(prefix)/lib
|
||||
|
||||
clean-silk:
|
||||
cd $(SILK_BUILD_DIR) && make clean
|
||||
|
||||
clean-makefile-silk:
|
||||
|
||||
veryclean-silk:
|
||||
rm -rf $(SILK_BUILD_DIR)
|
||||
|
||||
35
submodules/build/builders.d/srtp.mk
Normal file
35
submodules/build/builders.d/srtp.mk
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
srtp_version?=1.4.4
|
||||
#srtp_url?=http://srtp.sourceforge.net/srtp-$(srtp_version).tgz
|
||||
srtp_url=http://sourceforge.net/projects/srtp/files/srtp/$(srtp_version)/srtp-$(srtp_version).tgz/download
|
||||
srtp_tgz_file=srtp-$(srtp_version).tgz
|
||||
|
||||
$(BUILDER_SRC_DIR)/externals/$(srtp_tgz_file):
|
||||
cd $(BUILDER_SRC_DIR)/externals \
|
||||
&& wget $(srtp_url) -O $(srtp_tgz_file)
|
||||
|
||||
$(BUILDER_SRC_DIR)/$(srtp_dir)/configure: $(BUILDER_SRC_DIR)/externals/$(srtp_tgz_file)
|
||||
cd $(BUILDER_SRC_DIR)/externals \
|
||||
&& tar zxvf $(srtp_tgz_file) \
|
||||
&& cd srtp && patch -p0 < $(BUILDER_SRC_DIR)/build/builders.d/srtp.patch
|
||||
|
||||
$(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 && make clean
|
||||
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
|
||||
|
||||
24
submodules/build/builders.d/srtp.patch
Normal file
24
submodules/build/builders.d/srtp.patch
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
diff -rupN ../srtp_old/crypto/cipher/aes_icm.c ./crypto/cipher/aes_icm.c
|
||||
--- ../srtp_old/crypto/cipher/aes_icm.c 2006-03-16 18:11:29.000000000 +0100
|
||||
+++ ./crypto/cipher/aes_icm.c 2011-09-06 10:19:16.000000000 +0200
|
||||
@@ -281,7 +281,7 @@ aes_icm_set_iv(aes_icm_ctx_t *c, void *i
|
||||
* this is an internal, hopefully inlined function
|
||||
*/
|
||||
|
||||
-inline void
|
||||
+static void
|
||||
aes_icm_advance_ismacryp(aes_icm_ctx_t *c, uint8_t forIsmacryp) {
|
||||
/* fill buffer with new keystream */
|
||||
v128_copy(&c->keystream_buffer, &c->counter);
|
||||
diff -rupN ../srtp_old/crypto/math/datatypes.c ./crypto/math/datatypes.c
|
||||
--- ../srtp_old/crypto/math/datatypes.c 2005-10-08 18:38:06.000000000 +0200
|
||||
+++ ./crypto/math/datatypes.c 2011-09-06 10:02:55.000000000 +0200
|
||||
@@ -124,7 +124,7 @@ octet_string_hex_string(const void *s, i
|
||||
return bit_string;
|
||||
}
|
||||
|
||||
-inline int
|
||||
+static int
|
||||
hex_char_to_nibble(uint8_t c) {
|
||||
switch(c) {
|
||||
case ('0'): return 0x0;
|
||||
|
|
@ -39,7 +39,12 @@ ifneq (,$(findstring armv7,$(host)))
|
|||
endif
|
||||
|
||||
x264_dir?=externals/x264
|
||||
$(BUILDER_BUILD_DIR)/$(x264_dir)/configure:
|
||||
$(BUILDER_SRC_DIR)/$(x264_dir)/patched :
|
||||
cd $(BUILDER_SRC_DIR)/$(x264_dir) \
|
||||
&& git apply $(BUILDER_SRC_DIR)/build/builders.d/x264.patch \
|
||||
&& touch $(BUILDER_SRC_DIR)/$(x264_dir)/patched
|
||||
|
||||
$(BUILDER_BUILD_DIR)/$(x264_dir)/configure: $(BUILDER_SRC_DIR)/$(x264_dir)/patched
|
||||
mkdir -p $(BUILDER_BUILD_DIR)/$(x264_dir)
|
||||
cd $(BUILDER_BUILD_DIR)/$(x264_dir)/ \
|
||||
&& rsync -av --exclude ".git" $(BUILDER_SRC_DIR)/$(x264_dir)/* .
|
||||
|
|
|
|||
12
submodules/build/builders.d/x264.patch
Normal file
12
submodules/build/builders.d/x264.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/common/arm/asm.S b/common/arm/asm.S
|
||||
index 8e70403..259bb92 100644
|
||||
--- a/common/arm/asm.S
|
||||
+++ b/common/arm/asm.S
|
||||
@@ -47,6 +47,7 @@ ELF .eabi_attribute 25, \val
|
||||
.endm
|
||||
|
||||
.macro function name
|
||||
+ .align 2
|
||||
.global EXTERN_ASM\name
|
||||
EXTERN_ASM\name:
|
||||
ELF .hidden \name
|
||||
38
submodules/build/builders.d/zrtp.mk
Normal file
38
submodules/build/builders.d/zrtp.mk
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
$(BUILDER_SRC_DIR)/$(zrtpcpp_dir)/CMakeLists.txt.tracker: $(BUILDER_SRC_DIR)/build/builders.d/zrtpcpp.CMakeLists.txt
|
||||
cp $(BUILDER_SRC_DIR)/build/builders.d/zrtpcpp.CMakeLists.txt $(BUILDER_SRC_DIR)/$(zrtpcpp_dir)/CMakeLists.txt
|
||||
|
||||
|
||||
#I coudn't manage to crosscompile using only -D arguments to cmake
|
||||
#Thus the use of a toolchain file.
|
||||
$(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)/Makefile: $(BUILDER_SRC_DIR)/$(zrtpcpp_dir)/CMakeLists.txt.tracker
|
||||
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 -DCMAKE_TOOLCHAIN_FILE=$(BUILDER_SRC_DIR)build/iphone-toolchain.cmake \
|
||||
-LH -Wdev -DCMAKE_C_COMPILER=$$SDK_BIN_PATH/gcc -DCMAKE_CXX_COMPILER=$$SDK_BIN_PATH/g++ \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$$ARCH -DCMAKE_C_FLAGS="$$COMMON_FLAGS" -DCMAKE_CXX_FLAGS="$$COMMON_FLAGS" \
|
||||
-DCMAKE_INSTALL_PREFIX=$(prefix) -DCMAKE_FIND_ROOT_PATH="$(prefix)"
|
||||
# Used toolchain: $(TC)
|
||||
|
||||
ifeq ($(enable_zrtp),yes)
|
||||
|
||||
build-zrtpcpp: $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)/Makefile
|
||||
echo "Build ZRTP - prefix $(prefix)"
|
||||
cd $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir) && make VERBOSE=1 && make install
|
||||
|
||||
else
|
||||
build-zrtpcpp:
|
||||
echo "Build of zrtpcpp disabled"
|
||||
endif
|
||||
|
||||
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
|
||||
|
||||
veryclean-zrtpcpp:
|
||||
-rm -rf $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)
|
||||
|
||||
|
||||
169
submodules/build/builders.d/zrtpcpp.CMakeLists.txt
Executable file
169
submodules/build/builders.d/zrtpcpp.CMakeLists.txt
Executable file
|
|
@ -0,0 +1,169 @@
|
|||
# Copyright (C) 2009 Werner Dittman
|
||||
#
|
||||
# This file is free software; as a special exception the author gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
PROJECT(libzrtpcpp)
|
||||
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR 2)
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR 0)
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH 0)
|
||||
|
||||
set (VERSION 2.0.0)
|
||||
set (SOVERSION 2)
|
||||
set (PACKAGE libzrtpcpp)
|
||||
|
||||
if(MSVC60)
|
||||
set(BUILD_STATIC ON CACHE BOOL "static linking only" FORCE)
|
||||
MARK_AS_ADVANCED(BUILD_STATIC)
|
||||
else()
|
||||
option(BUILD_STATIC "Set to OFF to build shared libraries" ON)
|
||||
endif()
|
||||
|
||||
# set to true for debug and trace during CMakeLists development
|
||||
set(CMAKE_VERBOSE_MAKEFILE FALSE)
|
||||
|
||||
MESSAGE( STATUS "Configuring GNU ${PROJECT_NAME} ${VERSION}...")
|
||||
|
||||
# include most of the fine stuff we need
|
||||
include(cmake/Modules/FindGcryptConfig.cmake)
|
||||
include(FindPkgConfig)
|
||||
include(CheckLibraryExists)
|
||||
include(CheckIncludeFiles)
|
||||
include(cmake/Modules/AutoArgs.cmake)
|
||||
|
||||
if(${PROJECT_NAME} STREQUAL ${CMAKE_PROJECT_NAME})
|
||||
include(cmake/Modules/GeneratePackage.cmake)
|
||||
|
||||
GENERATE_PACKAGING(${PACKAGE} ${VERSION})
|
||||
endif()
|
||||
|
||||
# check the -Denable-ccrtp setting, defaults to true
|
||||
enable_arg(ccrtp true "Enable GNU ccRTP support for GNU ZRTP")
|
||||
args_help()
|
||||
|
||||
# this caused problems in debian where it has to always be lib....
|
||||
set(LIBDIRNAME "lib")
|
||||
if (NOT EXISTS /etc/debian_version)
|
||||
if ( "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" )
|
||||
set(LIBDIRNAME "lib64")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# setup the Thread include and lib
|
||||
find_package(Threads)
|
||||
if(CMAKE_HAVE_PTHREAD_H)
|
||||
set(HAVE_PTHREAD_H TRUE)
|
||||
endif()
|
||||
set(LIBS ${LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
if(enable_ccrtp)
|
||||
if (USES_CCRTP_INCLUDE_DIRS)
|
||||
message(STATUS " Using local commoncpp dependency")
|
||||
else()
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(USES_CCRTP libccrtp>=2.0.0)
|
||||
endif()
|
||||
include_directories(${USES_CCRTP_INCLUDE_DIRS})
|
||||
link_directories(${USES_CRTP_LIBRARY_DIRS})
|
||||
add_definitions(${USES_CCRTP_CFLAGS})
|
||||
set (LIBS ${LIBS} ${USES_CCRTP_LDFLAGS} ${USES_CCRTP_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if (CMAKE_CROSSCOMPILING)
|
||||
include_directories(${CMAKE_INSTALL_PREFIX}/include)
|
||||
link_directories(${CMAKE_INSTALL_PREFIX}/lib)
|
||||
set(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES} ${CMAKE_INSTALL_PREFIX}/include")
|
||||
## set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_INSTALL_PREFIX}/lib/*")
|
||||
endif()
|
||||
|
||||
|
||||
# now get info about crypto libraries
|
||||
gcr_check(GCRYPT gcrypt)
|
||||
#if(GCRYPT_FOUND)
|
||||
# check_include_files(gcrypt.h HAVE_GCRYPT_H)
|
||||
# set(LIBS ${LIBS} ${GCRYPT_LIBRARIES})
|
||||
# set(BUILD_REQ "libgcrypt-devel")
|
||||
# set(CRYPTOBACKEND="")
|
||||
# set(PACKAGE_REQ "libgcrypt")
|
||||
#else()
|
||||
pkg_check_modules(OPENSSL libcrypto>=0.9.8)
|
||||
if (OPENSSL_FOUND)
|
||||
check_include_files(openssl/bn.h HAVE_OPENSSL_BN_H)
|
||||
check_include_files(openssl/aes.h HAVE_OPENSSL_AES_H)
|
||||
check_include_files(openssl/sha.h HAVE_OPENSSL_SHA_H)
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -lcrypto")
|
||||
check_library_exists(crypto EVP_CipherInit_ex "${CMAKE_INSTALL_PREFIX}/lib" HAVE_SSL_CRYPT)
|
||||
# don't test HAVE_SSL_CRYPT_FOUND as it doesn't work
|
||||
if (HAVE_OPENSSL_BN_H_FOUND)
|
||||
# AND HAVE_OPENSSL_AES_H_FOUND AND HAVE_OPENSSL_SHA_H_FOUND))
|
||||
message(FATAL_ERROR "Openssl crypto library not found")
|
||||
endif()
|
||||
set(LIBS ${LIBS} -lcrypto)
|
||||
set(CRYPTOBACKEND "libcrypto >= 0.9.8")
|
||||
set(BUILD_REQ "libopenssl-devel >= 0.9.8")
|
||||
set(PACKAGE_REQ "libopenssl >= 0.9.8")
|
||||
else()
|
||||
message(FATAL_ERROR "No crypto library found")
|
||||
endif()
|
||||
#endif()
|
||||
|
||||
check_include_files(stdlib.h HAVE_STDLIB_H)
|
||||
check_include_files(string.h HAVE_STRING_H)
|
||||
|
||||
# necessary and required modules checked, ready to generate config.h
|
||||
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
# the following set(...) commands are only to have backward
|
||||
# compatibility with autoconf stuff to generate the pc file
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(exec_prefix ${prefix}/bin)
|
||||
set(libdir ${prefix}/lib)
|
||||
set(includedir ${prefix}/include)
|
||||
set(PACKAGE pkgconfig)
|
||||
configure_file(libzrtpcpp.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libzrtpcpp.pc @ONLY)
|
||||
|
||||
configure_file(libzrtpcpp.spec.cmake ${CMAKE_CURRENT_BINARY_DIR}/libzrtpcpp.spec @ONLY)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
|
||||
add_definitions(-g -O2 -fno-strict-aliasing)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
add_definitions(-Wno-long-long -Wno-char-subscripts)
|
||||
add_definitions(-Wall -ansi -pedantic)
|
||||
add_definitions(-DNEW_STDCPP)
|
||||
# add_definitions(-D__EXPORT=)
|
||||
endif()
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
if (enable_ccrtp)
|
||||
add_subdirectory(demo)
|
||||
endif()
|
||||
|
||||
if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/package/)
|
||||
MESSAGE(STATUS "package dir not found")
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/package/)
|
||||
endif()
|
||||
|
||||
########### install files ###############
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libzrtpcpp.pc DESTINATION ${LIBDIRNAME}/pkgconfig)
|
||||
|
||||
if(${PROJECT_NAME} STREQUAL ${CMAKE_PROJECT_NAME})
|
||||
|
||||
########### Add uninstall target ###############
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
add_custom_target(uninstall
|
||||
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
||||
|
||||
endif()
|
||||
|
|
@ -1,32 +1,38 @@
|
|||
# -*- shell-script -*-
|
||||
|
||||
GCC_VERSION=4.2
|
||||
SDK_VERSION_MAJOR=4
|
||||
SDK_VERSION=4.0
|
||||
|
||||
MCPU=""
|
||||
if test "${host_alias}" = "i386-apple-darwin" ; then
|
||||
PLATFORM=Simulator
|
||||
ARCH=i386
|
||||
CMAKE_OPTS="-DCMAKE_SYSTEM_PROCESSOR=i386"
|
||||
MCPU=""
|
||||
elif test "${host_alias}" = "armv6-apple-darwin" ; then
|
||||
ARCH=armv6
|
||||
PLATFORM=OS
|
||||
CMAKE_OPTS="-DCMAKE_SYSTEM_PROCESSOR=arm"
|
||||
MCPU="-mcpu=arm1176jzf-s"
|
||||
elif test "${host_alias}" = "armv7-apple-darwin" ; then
|
||||
ARCH=armv7
|
||||
PLATFORM=OS
|
||||
CMAKE_OPTS="-DCMAKE_SYSTEM_PROCESSOR=arm"
|
||||
MCPU="-mcpu=cortex-a8"
|
||||
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}"
|
||||
|
||||
SDK_PATH_LIST=`ls -drt /Developer/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs/iPhone${PLATFORM}4*`
|
||||
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
|
||||
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"
|
||||
OBJC="${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"
|
||||
LD="${SDK_BIN_PATH}/ld-${GCC_VERSION} -arch ${ARCH}"
|
||||
COMMON_FLAGS=" -arch ${ARCH} ${MCPU} -isysroot ${SYSROOT_PATH} -miphoneos-version-min=${SDK_VERSION} -DTARGET_OS_IPHONE -D__IOS"
|
||||
CC="${SDK_BIN_PATH}/gcc -std=c99 $COMMON_FLAGS"
|
||||
OBJC="${SDK_BIN_PATH}/gcc -std=c99 $COMMON_FLAGS"
|
||||
CXX="${SDK_BIN_PATH}/g++ $COMMON_FLAGS"
|
||||
LD="${SDK_BIN_PATH}/ld -arch ${ARCH}"
|
||||
AR=${SDK_BIN_PATH}/ar
|
||||
RANLIB=${SDK_BIN_PATH}/ranlib
|
||||
|
||||
|
|
|
|||
6
submodules/build/iphone-toolchain.cmake
Normal file
6
submodules/build/iphone-toolchain.cmake
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
SET (CMAKE_SYSTEM_NAME "Generic")
|
||||
SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
|
||||
13
submodules/build/iphone-toolchain.cmake.i386
Normal file
13
submodules/build/iphone-toolchain.cmake.i386
Normal file
|
|
@ -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)
|
||||
|
||||
|
||||
2
submodules/externals/libvpx
vendored
2
submodules/externals/libvpx
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 6f9457ec12a98b3aceefbcb79783c084268d0b36
|
||||
Subproject commit 4341e5af66c92531fcd3f3e66ac18e70b3752ca9
|
||||
2
submodules/externals/osip
vendored
2
submodules/externals/osip
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit c27b9b6702f62cdbd2143c1ccc85b8980b83adac
|
||||
Subproject commit 9e8c64cff496d2794fe352a6a3907e0e36988931
|
||||
2
submodules/externals/x264
vendored
2
submodules/externals/x264
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 08d04a4d30b452faed3b763528611737d994b30b
|
||||
Subproject commit 926a03a9c1f48d0fbd54b0e802d740774c100a78
|
||||
1
submodules/externals/zrtpcpp
vendored
Submodule
1
submodules/externals/zrtpcpp
vendored
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 3cbbcf29f707adaaa00958c6e2c321e79a7b8e83
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 74f64929191e62f473ddcd232c92c85f7d2a7fb0
|
||||
Subproject commit 6566c1179c6c30a4f436e71a6a2d4080f1609098
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 2f4b56078405d960c3201e57c985af167ff03e2e
|
||||
Subproject commit 6ba1b86990d60f1a29d11a4e0cdd71d7b6b1b5bf
|
||||
Loading…
Add table
Reference in a new issue