mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-02 02:16:24 +00:00
Enable arm64 compilation of the SDK. There's a bit of a rework of the makefiles here, so that they are shorter and more understandable.
This commit is contained in:
parent
f64a0d73cb
commit
d1b14454f5
10 changed files with 230 additions and 232 deletions
|
|
@ -87,19 +87,27 @@ LINPHONE_OPTIONS=enable_gpl_third_parties=$(enable_gpl_third_parties) \
|
|||
armv7-%:
|
||||
make -f builder-iphone-os.mk $(LINPHONE_OPTIONS) $*
|
||||
|
||||
arm64-%:
|
||||
make -f builder-iphone-os.mk host=aarch64-apple-darwin $(LINPHONE_OPTIONS) $* V=1 VERBOSE=1
|
||||
|
||||
simu-%:
|
||||
make -f builder-iphone-simulator.mk $(LINPHONE_OPTIONS) $*
|
||||
|
||||
arm64:
|
||||
make -f builder-iphone-os.mk host=aarch64-apple-darwin $(LINPHONE_OPTIONS) V=1 VERBOSE=1
|
||||
|
||||
build-% clean-% veryclean-%:
|
||||
make -f builder-iphone-simulator.mk $(LINPHONE_OPTIONS) $@ \
|
||||
&& make -f builder-iphone-os.mk $(LINPHONE_OPTIONS) $@
|
||||
|
||||
# sends the target after 'broadcast_' to all sub-architectures (armv7, simulator)
|
||||
# sends the target after 'broadcast_' to all sub-architectures (armv7, simu, arm64)
|
||||
broadcast_%:
|
||||
@echo "Broadcasting target '$*' to all sub-architectures"
|
||||
make -f builder-iphone-simulator.mk $(LINPHONE_OPTIONS) $* \
|
||||
&& make -f builder-iphone-os.mk $(LINPHONE_OPTIONS) $*
|
||||
&& make -f builder-iphone-os.mk $(LINPHONE_OPTIONS) $* \
|
||||
&& make -f builder-iphone-os.mk host=aarch64-apple-darwin $(LINPHONE_OPTIONS) $*
|
||||
|
||||
build-% clean-% veryclean-%:
|
||||
make -f builder-iphone-simulator.mk $(LINPHONE_OPTIONS) $@ \
|
||||
&& make -f builder-iphone-os.mk $(LINPHONE_OPTIONS) $@ \
|
||||
&& make -f builder-iphone-os.mk host=aarch64-apple-darwin $(LINPHONE_OPTIONS) $@
|
||||
|
||||
sdk:
|
||||
make -f builder-iphone-os.mk delivery-sdk
|
||||
|
|
@ -115,6 +123,9 @@ clean: broadcast_clean
|
|||
|
||||
veryclean: broadcast_veryclean
|
||||
|
||||
list-packages:
|
||||
@make -f builder-iphone-os.mk list-packages
|
||||
|
||||
|
||||
zipres:
|
||||
@tar -C ../.. -czf ../../ios_assets.tar.gz Resources iTunesArtwork
|
||||
|
|
@ -129,9 +140,12 @@ help:
|
|||
@echo " * ipa : builds all, creates the SDK, then builds an IPA of the Linphone-iphone application"
|
||||
@echo " * clean : clean all packages for all architectures"
|
||||
@echo " * veryclean : completely clean all packages for all architectures"
|
||||
@echo " * zipres : creates a tar.gz file with all the resources (images)"
|
||||
@echo ""
|
||||
@echo "=== Advanced usage ==="
|
||||
@echo ""
|
||||
@echo " * list-packages : lists the packages that you can build"
|
||||
@echo ""
|
||||
@echo " * build-[package] : builds the package for all architectures"
|
||||
@echo " * clean-[package] : clean the package for all architectures"
|
||||
@echo " * veryclean-[package] : completely clean the package for all architectures"
|
||||
|
|
|
|||
|
|
@ -56,9 +56,42 @@ LINPHONE_SRC_DIR=$(BUILDER_SRC_DIR)/linphone
|
|||
LINPHONE_BUILD_DIR=$(BUILDER_BUILD_DIR)/linphone
|
||||
LINPHONE_IPHONE_VERSION=$(shell git describe --always)
|
||||
|
||||
all: build-linphone build-msilbc build-msamr build-msx264 build-mssilk build-msbcg729 build-mswebrtc build-msopenh264
|
||||
# list of the submodules to build, the order is important
|
||||
MEDIASTREAMER_PLUGINS := msilbc \
|
||||
libilbc \
|
||||
msamr \
|
||||
mssilk \
|
||||
msx264 \
|
||||
# mswebrtc \ # we need to update it to be compatible with aarch64
|
||||
msopenh264 \
|
||||
msbcg729
|
||||
|
||||
# setup the switches that might trigger a linphone reconfiguration
|
||||
SUBMODULES_LIST := polarssl
|
||||
|
||||
ifeq ($(enable_tunnel),yes)
|
||||
SUBMODULES_LIST += tunnel
|
||||
endif
|
||||
|
||||
SUBMODULES_LIST += libantlr \
|
||||
cunit \
|
||||
belle-sip \
|
||||
srtp \
|
||||
speex \
|
||||
libgsm \
|
||||
libvpx \
|
||||
libxml2 \
|
||||
bzrtp \
|
||||
ffmpeg \
|
||||
opus
|
||||
|
||||
# build linphone (which depends on submodules) and then the plugins
|
||||
all: build-linphone $(addprefix build-,$(MEDIASTREAMER_PLUGINS))
|
||||
|
||||
|
||||
|
||||
####################################################################
|
||||
# setup the switches that might trigger a linphone recompilation
|
||||
####################################################################
|
||||
|
||||
enable_gpl_third_parties?=yes
|
||||
enable_ffmpeg?=yes
|
||||
|
|
@ -101,7 +134,6 @@ endif
|
|||
SWITCHES := $(addprefix $(LINPHONE_BUILD_DIR)/,$(SWITCHES))
|
||||
|
||||
mode_switch_check: $(SWITCHES)
|
||||
|
||||
#generic rule to force recompilation of linphone if some options require it
|
||||
$(LINPHONE_BUILD_DIR)/enable_% $(LINPHONE_BUILD_DIR)/disable_%:
|
||||
mkdir -p $(LINPHONE_BUILD_DIR)
|
||||
|
|
@ -109,58 +141,49 @@ $(LINPHONE_BUILD_DIR)/enable_% $(LINPHONE_BUILD_DIR)/disable_%:
|
|||
touch $@
|
||||
cd $(LINPHONE_BUILD_DIR) && rm -f Makefile && rm -f oRTP/Makefile && rm -f mediastreamer2/Makefile
|
||||
|
||||
# end of switches parsing
|
||||
####################################################################
|
||||
# Base rules:
|
||||
####################################################################
|
||||
|
||||
speex_dir=externals/speex
|
||||
gsm_dir=externals/gsm
|
||||
|
||||
MSILBC_SRC_DIR:=$(BUILDER_SRC_DIR)/msilbc
|
||||
MSILBC_BUILD_DIR:=$(BUILDER_BUILD_DIR)/msilbc
|
||||
|
||||
LIBILBC_SRC_DIR:=$(BUILDER_SRC_DIR)/libilbc-rfc3951
|
||||
LIBILBC_BUILD_DIR:=$(BUILDER_BUILD_DIR)/libilbc-rfc3951
|
||||
|
||||
ifneq (,$(findstring arm,$(host)))
|
||||
#SPEEX_CONFIGURE_OPTION := --enable-fixed-point --disable-float-api
|
||||
CFLAGS := $(CFLAGS) -marm
|
||||
SPEEX_CONFIGURE_OPTION := --disable-float-api --enable-arm5e-asm --enable-fixed-point
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring armv7,$(host)))
|
||||
SPEEX_CONFIGURE_OPTION += --enable-armv7neon-asm
|
||||
endif
|
||||
|
||||
clean-makefile: clean-makefile-linphone clean-makefile-msbcg729
|
||||
clean: clean-linphone clean-msbcg729
|
||||
clean-makefile: clean-makefile-linphone
|
||||
clean: clean-linphone
|
||||
init:
|
||||
mkdir -p $(prefix)/include
|
||||
mkdir -p $(prefix)/lib/pkgconfig
|
||||
|
||||
veryclean: veryclean-linphone veryclean-msbcg729
|
||||
veryclean: veryclean-linphone
|
||||
rm -rf $(BUILDER_BUILD_DIR)
|
||||
|
||||
# list of the submodules to build, the order is important
|
||||
MS_MODULES := msilbc libilbc msamr mssilk msx264 mswebrtc msopenh264
|
||||
SUBMODULES_LIST := polarssl
|
||||
list-packages:
|
||||
@echo "Submodules:"
|
||||
@echo "$(addprefix \nbuild-,$(SUBMODULES_LIST))"
|
||||
@echo "\nPlugins: "
|
||||
@echo "$(addprefix \nbuild-,$(MEDIASTREAMER_PLUGINS))"
|
||||
|
||||
ifeq ($(enable_tunnel),yes)
|
||||
SUBMODULES_LIST += tunnel
|
||||
endif
|
||||
####################################################################
|
||||
# Linphone compilation
|
||||
####################################################################
|
||||
|
||||
SUBMODULES_LIST += libantlr cunit belle-sip srtp speex libgsm libvpx libxml2 bzrtp ffmpeg opus
|
||||
build-submodules: $(addprefix build-,$(SUBMODULES_LIST))
|
||||
|
||||
.NOTPARALLEL build-linphone: init $(addprefix build-,$(SUBMODULES_LIST)) mode_switch_check $(LINPHONE_BUILD_DIR)/Makefile
|
||||
cd $(LINPHONE_BUILD_DIR) && export PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig export CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make newdate && make && make install
|
||||
mkdir -p $(prefix)/share/linphone/tutorials && cp -f $(LINPHONE_SRC_DIR)/coreapi/help/*.c $(prefix)/share/linphone/tutorials/
|
||||
.NOTPARALLEL build-linphone: init build-submodules mode_switch_check $(LINPHONE_BUILD_DIR)/Makefile
|
||||
cd $(LINPHONE_BUILD_DIR) \
|
||||
&& PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig \
|
||||
CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
make newdate \
|
||||
&& make \
|
||||
&& make install
|
||||
mkdir -p $(prefix)/share/linphone/tutorials \&& cp -f $(LINPHONE_SRC_DIR)/coreapi/help/*.c $(prefix)/share/linphone/tutorials/
|
||||
|
||||
clean-linphone: $(addprefix clean-,$(SUBMODULES_LIST)) $(addprefix clean-,$(MS_MODULES))
|
||||
clean-linphone: $(addprefix clean-,$(SUBMODULES_LIST)) $(addprefix clean-,$(MEDIASTREAMER_PLUGINS))
|
||||
cd $(LINPHONE_BUILD_DIR) && make clean
|
||||
|
||||
veryclean-linphone: $(addprefix veryclean-,$(SUBMODULES_LIST)) $(addprefix veryclean-,$(MS_MODULES))
|
||||
veryclean-linphone: $(addprefix veryclean-,$(SUBMODULES_LIST)) $(addprefix veryclean-,$(MEDIASTREAMER_PLUGINS))
|
||||
#-cd $(LINPHONE_BUILD_DIR) && make distclean
|
||||
-cd $(LINPHONE_SRC_DIR) && rm -f configure
|
||||
|
||||
clean-makefile-linphone: $(addprefix clean-makefile-,$(SUBMODULES_LIST)) $(addprefix clean-makefile-,$(MS_MODULES))
|
||||
clean-makefile-linphone: $(addprefix clean-makefile-,$(SUBMODULES_LIST)) $(addprefix clean-makefile-,$(MEDIASTREAMER_PLUGINS))
|
||||
cd $(LINPHONE_BUILD_DIR) && rm -f Makefile && rm -f oRTP/Makefile && rm -f mediastreamer2/Makefile
|
||||
|
||||
|
||||
|
|
@ -188,105 +211,12 @@ clean-makefile-liblinphone:
|
|||
clean-liblinphone:
|
||||
cd $(LINPHONE_BUILD_DIR) && make clean
|
||||
|
||||
#speex
|
||||
|
||||
$(BUILDER_SRC_DIR)/$(speex_dir)/configure:
|
||||
cd $(BUILDER_SRC_DIR)/$(speex_dir) && ./autogen.sh
|
||||
|
||||
$(BUILDER_BUILD_DIR)/$(speex_dir)/Makefile: $(BUILDER_SRC_DIR)/$(speex_dir)/configure
|
||||
mkdir -p $(BUILDER_BUILD_DIR)/$(speex_dir)
|
||||
cd $(BUILDER_BUILD_DIR)/$(speex_dir)/\
|
||||
&& CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) CFLAGS="$(CFLAGS) -O2" \
|
||||
$(BUILDER_SRC_DIR)/$(speex_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode} --disable-ogg $(SPEEX_CONFIGURE_OPTION)
|
||||
|
||||
build-speex: $(BUILDER_BUILD_DIR)/$(speex_dir)/Makefile
|
||||
cd $(BUILDER_BUILD_DIR)/$(speex_dir) && make && make install
|
||||
|
||||
clean-speex:
|
||||
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
|
||||
|
||||
|
||||
#GSM
|
||||
|
||||
build-libgsm:
|
||||
cp -rf $(BUILDER_SRC_DIR)/$(gsm_dir) $(BUILDER_BUILD_DIR)/$(gsm_dir)
|
||||
rm -rf $(BUILDER_BUILD_DIR)/$(gsm_dir)/gsm/.git
|
||||
rm -f $(prefix)/lib/libgsm.a
|
||||
rm -rf $(prefix)/include/gsm
|
||||
cd $(BUILDER_BUILD_DIR)/$(gsm_dir)\
|
||||
&& mkdir -p $(prefix)/include/gsm \
|
||||
&& host_alias=$(host) . $(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
&& make -j1 CC="$${CC}" INSTALL_ROOT=$(prefix) GSM_INSTALL_INC=$(prefix)/include/gsm install
|
||||
|
||||
clean-libgsm:
|
||||
cd $(BUILDER_BUILD_DIR)/$(gsm_dir)\
|
||||
&& make clean
|
||||
|
||||
veryclean-libgsm:
|
||||
-cd $(BUILDER_BUILD_DIR)/$(gsm_dir) \
|
||||
&& make uninstall
|
||||
|
||||
|
||||
|
||||
# msilbc plugin
|
||||
|
||||
$(MSILBC_SRC_DIR)/configure:
|
||||
cd $(MSILBC_SRC_DIR) && ./autogen.sh
|
||||
|
||||
$(MSILBC_BUILD_DIR)/Makefile: $(MSILBC_SRC_DIR)/configure
|
||||
mkdir -p $(MSILBC_BUILD_DIR)
|
||||
cd $(MSILBC_BUILD_DIR) && \
|
||||
PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
$(MSILBC_SRC_DIR)/configure -prefix=$(prefix) --host=$(host) $(library_mode)
|
||||
|
||||
build-msilbc: build-libilbc $(MSILBC_BUILD_DIR)/Makefile
|
||||
cd $(MSILBC_BUILD_DIR) && make && make install
|
||||
|
||||
clean-msilbc:
|
||||
cd $(MSILBC_BUILD_DIR) && make clean
|
||||
|
||||
veryclean-msilbc:
|
||||
# -cd $(MSILBC_BUILD_DIR) && make distclean
|
||||
-cd $(MSILBC_SRC_DIR) && rm configure
|
||||
|
||||
clean-makefile-msilbc:
|
||||
cd $(MSILBC_BUILD_DIR) && rm -f Makefile
|
||||
|
||||
# libilbc
|
||||
|
||||
$(LIBILBC_SRC_DIR)/configure:
|
||||
cd $(LIBILBC_SRC_DIR) && ./autogen.sh
|
||||
|
||||
$(LIBILBC_BUILD_DIR)/Makefile: $(LIBILBC_SRC_DIR)/configure
|
||||
mkdir -p $(LIBILBC_BUILD_DIR)
|
||||
cd $(LIBILBC_BUILD_DIR) && \
|
||||
PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
$(LIBILBC_SRC_DIR)/configure -prefix=$(prefix) --host=$(host) $(library_mode)
|
||||
|
||||
build-libilbc: $(LIBILBC_BUILD_DIR)/Makefile
|
||||
cd $(LIBILBC_BUILD_DIR) && make && make install
|
||||
|
||||
clean-libilbc:
|
||||
cd $(LIBILBC_BUILD_DIR) && make clean
|
||||
|
||||
veryclean-libilbc:
|
||||
-cd $(LIBILBC_BUILD_DIR) && make distclean
|
||||
|
||||
clean-makefile-libilbc:
|
||||
cd $(LIBILBC_BUILD_DIR) && rm -f Makefile
|
||||
|
||||
#openssl
|
||||
#srtp
|
||||
#zrtp
|
||||
include builders.d/*.mk
|
||||
#sdk generation and distribution
|
||||
|
||||
####################################################################
|
||||
# sdk generation and distribution
|
||||
####################################################################
|
||||
|
||||
multi-arch:
|
||||
arm_archives=`find $(prefix) -name *.a` ;\
|
||||
|
|
@ -294,24 +224,20 @@ 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/armv7/i386/"` ;\
|
||||
armv6_path=`echo $$archive | sed -e "s/armv7/armv6/"` ;\
|
||||
if test ! -f "$$armv6_path"; then \
|
||||
armv6_path= ; \
|
||||
i386_path=`echo $$archive | sed -e "s/armv7/i386/"` ;\
|
||||
arm64_path=`echo $$archive | sed -e "s/armv7/aarch64/"` ;\
|
||||
if test ! -f "$$arm64_path"; then \
|
||||
arm64_path= ; \
|
||||
fi; \
|
||||
armv7s_path=`echo $$archive | sed -e "s/armv7/armv7s/"` ;\
|
||||
if test ! -f "$$armv7s_path"; then \
|
||||
armv7s_path= ; \
|
||||
fi; \
|
||||
destpath=`echo $$archive | sed -e "s/-debug//"` ;\
|
||||
destpath=`echo $$destpath | sed -e "s/armv7-//"` ;\
|
||||
if test -f "$$i386_path"; then \
|
||||
echo "Mixing $$archive into $$destpath"; \
|
||||
mkdir -p `dirname $$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 \
|
||||
destpath=`echo $$archive | sed -e "s/-debug//"` ;\
|
||||
destpath=`echo $$destpath | sed -e "s/armv7-//"` ;\
|
||||
if test -f "$$i386_path"; then \
|
||||
echo "Mixing $$archive into $$destpath"; \
|
||||
mkdir -p `dirname $$destpath` ; \
|
||||
lipo -create $$archive $$arm64_path $$i386_path -output $$destpath; \
|
||||
else \
|
||||
echo "WARNING: archive `basename $$archive` exists in arm tree but does not exists in i386 tree."; \
|
||||
fi \
|
||||
done
|
||||
if ! test -f $(prefix)/../apple-darwin/lib/libtunnel.a ; then \
|
||||
cp -f $(BUILDER_SRC_DIR)/../submodules/binaries/libdummy.a $(prefix)/../apple-darwin/lib/libtunnel.a ; \
|
||||
|
|
@ -329,6 +255,7 @@ delivery-sdk: multi-arch
|
|||
-x liblinphone-tutorials/hello-world/hello-world.xcodeproj/*.mode1v3
|
||||
|
||||
download-sdk:
|
||||
@echo "Downloading the latest binary SDK"
|
||||
cd $(BUILDER_SRC_DIR)/../
|
||||
rm -fr liblinphone-iphone-sdk-latest*
|
||||
wget http://linphone.org/snapshots/ios/liblinphone-iphone-sdk-latest.zip
|
||||
|
|
|
|||
23
submodules/build/builders.d/gsm.mk
Normal file
23
submodules/build/builders.d/gsm.mk
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
#GSM
|
||||
|
||||
gsm_dir?=externals/gsm
|
||||
|
||||
|
||||
build-libgsm:
|
||||
cp -rf $(BUILDER_SRC_DIR)/$(gsm_dir) $(BUILDER_BUILD_DIR)/$(gsm_dir)
|
||||
rm -rf $(BUILDER_BUILD_DIR)/$(gsm_dir)/gsm/.git
|
||||
rm -f $(prefix)/lib/libgsm.a
|
||||
rm -rf $(prefix)/include/gsm
|
||||
cd $(BUILDER_BUILD_DIR)/$(gsm_dir)\
|
||||
&& mkdir -p $(prefix)/include/gsm \
|
||||
&& host_alias=$(host) . $(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
&& make -j1 CC="$${CC}" INSTALL_ROOT=$(prefix) GSM_INSTALL_INC=$(prefix)/include/gsm install
|
||||
|
||||
clean-libgsm:
|
||||
cd $(BUILDER_BUILD_DIR)/$(gsm_dir)\
|
||||
&& make clean
|
||||
|
||||
veryclean-libgsm:
|
||||
-cd $(BUILDER_BUILD_DIR)/$(gsm_dir) \
|
||||
&& make uninstall
|
||||
27
submodules/build/builders.d/libilbc.mk
Normal file
27
submodules/build/builders.d/libilbc.mk
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
# libilbc
|
||||
|
||||
|
||||
LIBILBC_SRC_DIR:=$(BUILDER_SRC_DIR)/libilbc-rfc3951
|
||||
LIBILBC_BUILD_DIR:=$(BUILDER_BUILD_DIR)/libilbc-rfc3951
|
||||
|
||||
$(LIBILBC_SRC_DIR)/configure:
|
||||
cd $(LIBILBC_SRC_DIR) && ./autogen.sh
|
||||
|
||||
$(LIBILBC_BUILD_DIR)/Makefile: $(LIBILBC_SRC_DIR)/configure
|
||||
mkdir -p $(LIBILBC_BUILD_DIR)
|
||||
cd $(LIBILBC_BUILD_DIR) && \
|
||||
PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
$(LIBILBC_SRC_DIR)/configure -prefix=$(prefix) --host=$(host) $(library_mode)
|
||||
|
||||
build-libilbc: $(LIBILBC_BUILD_DIR)/Makefile
|
||||
cd $(LIBILBC_BUILD_DIR) && make && make install
|
||||
|
||||
clean-libilbc:
|
||||
cd $(LIBILBC_BUILD_DIR) && make clean
|
||||
|
||||
veryclean-libilbc:
|
||||
-cd $(LIBILBC_BUILD_DIR) && make distclean
|
||||
|
||||
clean-makefile-libilbc:
|
||||
cd $(LIBILBC_BUILD_DIR) && rm -f Makefile
|
||||
|
|
@ -19,6 +19,8 @@ else ifneq (,$(findstring armv7s,$(host)))
|
|||
else ifneq (,$(findstring armv7,$(host)))
|
||||
libvpx_configure_options+= --target=armv7-darwin-gcc
|
||||
take_binary = armv7
|
||||
else ifneq (,$(findstring aarch64,$(host)))
|
||||
libvpx_configure_options+= --target=arm64-darwin-gcc
|
||||
else
|
||||
libvpx_configure_options+= --target=x86-darwin10-gcc
|
||||
take_binary = i386
|
||||
|
|
@ -30,9 +32,7 @@ endif
|
|||
|
||||
|
||||
|
||||
all_p=armv6-darwin-gcc #neon Cortex-A8
|
||||
all_p+=armv7-darwin-gcc #neon Cortex-A8
|
||||
all_p+=armv7s-darwin-gcc #neon Cortex-A8
|
||||
|
||||
ifeq ($(force_non_binary_libvpx),1)
|
||||
take_binary=
|
||||
|
|
@ -45,7 +45,7 @@ $(BUILDER_SRC_DIR)/$(libvpx_dir)/patched.stamp:
|
|||
&& touch $@
|
||||
|
||||
|
||||
$(BUILDER_BUILD_DIR)/$(libvpx_dir)/config.mk: $(BUILDER_SRC_DIR)/$(libvpx_dir)/patched.stamp
|
||||
$(BUILDER_BUILD_DIR)/$(libvpx_dir)/config.mk:
|
||||
mkdir -p $(BUILDER_BUILD_DIR)/$(libvpx_dir)
|
||||
cd $(BUILDER_BUILD_DIR)/$(libvpx_dir)/ \
|
||||
&& host_alias=${host} . $(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
|
|
|
|||
|
|
@ -1,61 +0,0 @@
|
|||
diff --git a/build/make/configure.sh b/build/make/configure.sh
|
||||
index a65d395..579e0d6 100755
|
||||
--- a/build/make/configure.sh
|
||||
+++ b/build/make/configure.sh
|
||||
@@ -172,6 +172,7 @@ add_cflags() {
|
||||
|
||||
|
||||
add_cflags_only() {
|
||||
+ log_echo "Adding $@ to CFLAGS"
|
||||
CFLAGS="${CFLAGS} $@"
|
||||
}
|
||||
|
||||
@@ -792,7 +793,7 @@ process_common_toolchain() {
|
||||
arm*)
|
||||
# on arm, isa versions are supersets
|
||||
case ${tgt_isa} in
|
||||
- armv7)
|
||||
+ armv7*)
|
||||
soft_enable neon
|
||||
soft_enable media
|
||||
soft_enable edsp
|
||||
@@ -820,7 +821,9 @@ process_common_toolchain() {
|
||||
arch_int=${arch_int%%te}
|
||||
check_add_asflags --defsym ARCHITECTURE=${arch_int}
|
||||
tune_cflags="-mtune="
|
||||
- if [ ${tgt_isa} = "armv7" ]; then
|
||||
+
|
||||
+ case ${tgt_isa} in
|
||||
+ armv7*)
|
||||
if [ -z "${float_abi}" ]; then
|
||||
check_cpp <<EOF && float_abi=hard || float_abi=softfp
|
||||
#ifndef __ARM_PCS_VFP
|
||||
@@ -840,10 +843,12 @@ EOF
|
||||
if [ -z "${tune_cpu}" ]; then
|
||||
tune_cpu=cortex-a8
|
||||
fi
|
||||
- else
|
||||
+ ;;
|
||||
+ *)
|
||||
check_add_cflags -march=${tgt_isa}
|
||||
check_add_asflags -march=${tgt_isa}
|
||||
- fi
|
||||
+ ;;
|
||||
+ esac
|
||||
|
||||
enabled debug && add_asflags -g
|
||||
asm_conversion_cmd="${source_path}/build/make/ads2gas.pl"
|
||||
diff --git a/build/make/rtcd.pl b/build/make/rtcd.pl
|
||||
index 18ee80d..a3dc890 100755
|
||||
--- a/build/make/rtcd.pl
|
||||
+++ b/build/make/rtcd.pl
|
||||
@@ -383,6 +383,9 @@ if ($opts{arch} eq 'x86') {
|
||||
} elsif ($opts{arch} eq 'armv7') {
|
||||
@ALL_ARCHS = filter(qw/edsp media neon/);
|
||||
arm;
|
||||
+} elsif ($opts{arch} eq 'armv7s') {
|
||||
+ @ALL_ARCHS = filter(qw/edsp media neon/);
|
||||
+ arm;
|
||||
} else {
|
||||
unoptimized;
|
||||
}
|
||||
29
submodules/build/builders.d/msilbc.mk
Normal file
29
submodules/build/builders.d/msilbc.mk
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
|
||||
# msilbc plugin
|
||||
|
||||
msilbc_dir?=msilbc
|
||||
|
||||
MSILBC_SRC_DIR:=$(BUILDER_SRC_DIR)/$(msilbc_dir)
|
||||
MSILBC_BUILD_DIR:=$(BUILDER_BUILD_DIR)/$(msilbc_dir)
|
||||
|
||||
$(MSILBC_SRC_DIR)/configure:
|
||||
cd $(MSILBC_SRC_DIR) && ./autogen.sh
|
||||
|
||||
$(MSILBC_BUILD_DIR)/Makefile: $(MSILBC_SRC_DIR)/configure
|
||||
mkdir -p $(MSILBC_BUILD_DIR)
|
||||
cd $(MSILBC_BUILD_DIR) && \
|
||||
PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
$(MSILBC_SRC_DIR)/configure -prefix=$(prefix) --host=$(host) $(library_mode)
|
||||
|
||||
build-msilbc: build-libilbc $(MSILBC_BUILD_DIR)/Makefile
|
||||
cd $(MSILBC_BUILD_DIR) && make && make install
|
||||
|
||||
clean-msilbc:
|
||||
cd $(MSILBC_BUILD_DIR) && make clean
|
||||
|
||||
veryclean-msilbc:
|
||||
# -cd $(MSILBC_BUILD_DIR) && make distclean
|
||||
-cd $(MSILBC_SRC_DIR) && rm configure
|
||||
|
||||
clean-makefile-msilbc:
|
||||
cd $(MSILBC_BUILD_DIR) && rm -f Makefile
|
||||
|
|
@ -26,8 +26,8 @@ endif
|
|||
ifneq (,$(findstring armv7-,$(host)))
|
||||
ARCH=armv7
|
||||
endif
|
||||
ifneq (,$(findstring armv7s-,$(host)))
|
||||
ARCH=armv7s
|
||||
ifneq (,$(findstring aarch64-,$(host)))
|
||||
ARCH=arm64
|
||||
endif
|
||||
|
||||
openh264_dir?=externals/openh264
|
||||
|
|
|
|||
44
submodules/build/builders.d/speex.mk
Normal file
44
submodules/build/builders.d/speex.mk
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
#speex
|
||||
|
||||
speex_dir=externals/speex
|
||||
|
||||
|
||||
ifneq (,$(findstring arm,$(host)))
|
||||
#SPEEX_CONFIGURE_OPTION := --enable-fixed-point --disable-float-api
|
||||
CFLAGS := $(CFLAGS) -marm
|
||||
SPEEX_CONFIGURE_OPTION := --disable-float-api --enable-arm5e-asm --enable-fixed-point
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring armv7,$(host)))
|
||||
SPEEX_CONFIGURE_OPTION += --enable-armv7neon-asm
|
||||
endif
|
||||
ifneq (,$(findstring aarch64,$(host)))
|
||||
SPEEX_CONFIGURE_OPTION += --disable-armv7neon-asm
|
||||
endif
|
||||
|
||||
ifeq ($(enable_debug),yes)
|
||||
CFLAGS := $(CFLAGS) -g
|
||||
SPEEX_CONFIGURE_OPTION += --enable-debug
|
||||
endif
|
||||
|
||||
$(BUILDER_SRC_DIR)/$(speex_dir)/configure:
|
||||
cd $(BUILDER_SRC_DIR)/$(speex_dir) && ./autogen.sh
|
||||
|
||||
$(BUILDER_BUILD_DIR)/$(speex_dir)/Makefile: $(BUILDER_SRC_DIR)/$(speex_dir)/configure
|
||||
mkdir -p $(BUILDER_BUILD_DIR)/$(speex_dir)
|
||||
cd $(BUILDER_BUILD_DIR)/$(speex_dir)/\
|
||||
&& CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) CFLAGS="$(CFLAGS) -O2" \
|
||||
$(BUILDER_SRC_DIR)/$(speex_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode} --disable-ogg $(SPEEX_CONFIGURE_OPTION)
|
||||
|
||||
build-speex: $(BUILDER_BUILD_DIR)/$(speex_dir)/Makefile
|
||||
cd $(BUILDER_BUILD_DIR)/$(speex_dir) && make && make install
|
||||
|
||||
clean-speex:
|
||||
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
|
||||
|
|
@ -10,22 +10,17 @@ if test "${host_alias}" = "i386-apple-darwin" ; then
|
|||
CMAKE_OPTS="-DCMAKE_SYSTEM_PROCESSOR=i386"
|
||||
MCPU=""
|
||||
CLANG_TARGET_SPECIFIER=mios-simulator-version-min
|
||||
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
|
||||
elif test "${host_alias}" = "aarch64-apple-darwin" ; then
|
||||
ARCH=arm64
|
||||
PLATFORM=OS
|
||||
CMAKE_OPTS="-DCMAKE_SYSTEM_PROCESSOR=arm"
|
||||
CMAKE_OPTS="-DCMAKE_SYSTEM_PROCESSOR=aarch64"
|
||||
else
|
||||
echo "bad host ${host_alias} must be either i386-apple-darwin or armv[6,7,7s]-apple-darwin"
|
||||
echo "bad host ${host_alias} must be either i386-apple-darwin or arm[v7,64]-apple-darwin"
|
||||
exit
|
||||
fi
|
||||
echo "Loading config.site for iPhone platform=${PLATFORM} version=${SDK_VERSION}"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue