mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
port sdk to clang except for mssilk & opencore-amr
This commit is contained in:
parent
bea35b0ac3
commit
dec3c0bfd1
8 changed files with 71 additions and 17 deletions
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
host?=armv7-apple-darwin
|
||||
config_site:=iphone-config.site
|
||||
config_site_gcc:=iphone-config-gcc.site
|
||||
library_mode:= --disable-shared --enable-static
|
||||
linphone_configure_controls= \
|
||||
--disable-strict \
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ $(BUILDER_BUILD_DIR)/$(mssilk_dir)/Makefile: $(BUILDER_SRC_DIR)/$(mssilk_dir)/co
|
|||
echo -e "\033[01;32m Running configure in $(BUILDER_BUILD_DIR)/$(mssilk_dir) \033[0m"
|
||||
mkdir -p $(BUILDER_BUILD_DIR)/$(mssilk_dir)
|
||||
cd $(BUILDER_BUILD_DIR)/$(mssilk_dir)/ \
|
||||
&& PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
&& PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site_gcc) \
|
||||
$(BUILDER_SRC_DIR)/$(mssilk_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode} \
|
||||
--enable-static
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ build-mssilk: $(BUILDER_BUILD_DIR)/$(mssilk_dir)/Makefile
|
|||
echo -e "\033[01;32m building silk \033[0m"
|
||||
cd $(BUILDER_BUILD_DIR)/$(mssilk_dir) \
|
||||
&& PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig \
|
||||
CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site_gcc) \
|
||||
make -j1 && make install
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -31,11 +31,11 @@ $(BUILDER_SRC_DIR)/$(opencore-amr_dir)/configure: $(BUILDER_SRC_DIR)/$(opencore-
|
|||
$(BUILDER_BUILD_DIR)/$(opencore-amr_dir)/Makefile: $(BUILDER_SRC_DIR)/$(opencore-amr_dir)/configure
|
||||
mkdir -p $(BUILDER_BUILD_DIR)/$(opencore-amr_dir)
|
||||
cd $(BUILDER_BUILD_DIR)/$(opencore-amr_dir)/ \
|
||||
&& CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
&& CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site_gcc) \
|
||||
$(BUILDER_SRC_DIR)/$(opencore-amr_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode} ${opencore-amr-configure-option}
|
||||
|
||||
build-opencore-amr: $(BUILDER_BUILD_DIR)/$(opencore-amr_dir)/Makefile
|
||||
cd $(BUILDER_BUILD_DIR)/$(opencore-amr_dir) && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make && make install
|
||||
cd $(BUILDER_BUILD_DIR)/$(opencore-amr_dir) && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site_gcc) make && make install
|
||||
|
||||
clean-opencore-amr:
|
||||
cd $(BUILDER_BUILD_DIR)/$(opencore-amr_dir) && make clean
|
||||
|
|
|
|||
|
|
@ -23,10 +23,12 @@ opus_dir?=externals/opus
|
|||
enable_opus?=yes
|
||||
|
||||
libopus_configure_options=--disable-extra-programs --disable-doc
|
||||
#ifeq (,$(findstring armv7s,$(host)))
|
||||
# libopus_configure_options+= --enable-fixed-point
|
||||
#compilation error with armv7, switching to fpu impl
|
||||
#endif
|
||||
ifneq (,$(findstring armv7,$(host)))
|
||||
libopus_configure_options+= --enable-fixed-point --disable-asm
|
||||
endif
|
||||
ifneq (,$(findstring armv7s,$(host)))
|
||||
libopus_configure_options+= --enable-fixed-point --disable-asm
|
||||
endif
|
||||
|
||||
$(BUILDER_SRC_DIR)/$(opus_dir)/configure:
|
||||
@echo -e "\033[01;32m Running autogen for msopus in $(BUILDER_SRC_DIR)/$(opus_dir) \033[0m"
|
||||
|
|
@ -47,7 +49,7 @@ build-opus: $(BUILDER_BUILD_DIR)/$(opus_dir)/Makefile
|
|||
cd $(BUILDER_BUILD_DIR)/$(opus_dir) \
|
||||
&& PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig \
|
||||
CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
make -j1 && make install
|
||||
make && make install
|
||||
|
||||
|
||||
else
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ $(BUILDER_BUILD_DIR)/$(srtp_dir)/Makefile: $(BUILDER_SRC_DIR)/$(srtp_dir)/config
|
|||
|
||||
build-srtp: $(BUILDER_BUILD_DIR)/$(srtp_dir)/Makefile
|
||||
host_alias=$(host) && . /$(BUILDER_SRC_DIR)/build/$(config_site) && \
|
||||
cd $(BUILDER_BUILD_DIR)/$(srtp_dir) && make libsrtp.a AR=$$AR && make install
|
||||
cd $(BUILDER_BUILD_DIR)/$(srtp_dir) && make libsrtp.a AR="$$AR" && make install
|
||||
|
||||
clean-srtp:
|
||||
-cd $(BUILDER_BUILD_DIR)/$(srtp_dir) && make clean
|
||||
|
|
|
|||
51
submodules/build/iphone-config-gcc.site
Normal file
51
submodules/build/iphone-config-gcc.site
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
# -*- shell-script -*-
|
||||
|
||||
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"
|
||||
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_DEV_PATH=`xcode-select -print-path`
|
||||
#new path with Xcode 4.3:
|
||||
if test -d ${XCODE_DEV_PATH}/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs ; then
|
||||
SDK_PATH_LIST=`ls -drt ${XCODE_DEV_PATH}/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs/iPhone${PLATFORM}*`
|
||||
SDK_BIN_PATH=${XCODE_DEV_PATH}/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
|
||||
fi
|
||||
|
||||
for SYSROOT_PATH in $SDK_PATH_LIST ; do echo $SYSROOT_PATH ; done ;
|
||||
echo "Selecting SDK path = ${SYSROOT_PATH}"
|
||||
COMMON_FLAGS=" -arch ${ARCH} ${MCPU} -isysroot ${SYSROOT_PATH} -miphoneos-version-min=${SDK_VERSION} -DTARGET_OS_IPHONE=1 -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
|
||||
|
||||
CPPFLAGS="-Dasm=__asm"
|
||||
OBJCFLAGS="-x objective-c -fexceptions -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch"
|
||||
|
|
@ -40,12 +40,12 @@ fi
|
|||
for SYSROOT_PATH in $SDK_PATH_LIST ; do echo $SYSROOT_PATH ; done ;
|
||||
echo "Selecting SDK path = ${SYSROOT_PATH}"
|
||||
COMMON_FLAGS=" -arch ${ARCH} ${MCPU} -isysroot ${SYSROOT_PATH} -miphoneos-version-min=${SDK_VERSION} -DTARGET_OS_IPHONE=1 -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
|
||||
CC="xcrun clang -std=c99 $COMMON_FLAGS"
|
||||
OBJC="xcrun clang -std=c99 $COMMON_FLAGS"
|
||||
CXX="xcrun clang++ $COMMON_FLAGS"
|
||||
LD="xcrun ld -arch ${ARCH}"
|
||||
AR="xcrun ar"
|
||||
RANLIB="xcrun ranlib"
|
||||
|
||||
CPPFLAGS="-Dasm=__asm"
|
||||
OBJCFLAGS="-x objective-c -fexceptions -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch"
|
||||
|
|
|
|||
2
submodules/externals/speex
vendored
2
submodules/externals/speex
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit e780bd2ce36af4133fd0ff304ab2078f1dacaaf6
|
||||
Subproject commit 3c317818481b67e0dd732e5dc045d6b981a8775b
|
||||
Loading…
Add table
Reference in a new issue