mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 02:58:07 +00:00
Allow to compile for x64_64 simulator
This commit is contained in:
parent
fa6ef0ca7c
commit
06c899648d
6 changed files with 66 additions and 64 deletions
|
|
@ -59,6 +59,8 @@ Linphone for iPhone depends on liblinphone SDK. This SDK is generated from makef
|
|||
This SDK can be generated in 2 flavors. First is with GPL third parties, it means liblinphone includes GPL third parties like FFMPEG or X264.
|
||||
If you choose this flavor, your final application must comply with GPL in any case. This is the default mode.
|
||||
|
||||
Note: We are not compiling for the 32 bits i386 simulator by default, for speed reasons. If you want to activate it, you should call make with "enable_i386=yes".
|
||||
|
||||
To generate the liblinphone multi arch sdk in GPL mode, do:
|
||||
|
||||
cd submodules/build && make all
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit e5e0590db8917ccbf5631ec42022bb9f8e03b064
|
||||
Subproject commit 7fe6d9d38f9abc6adc7139341a3819026d5400a4
|
||||
|
|
@ -24,7 +24,7 @@ enable_zrtp=yes
|
|||
enable_ffmpeg=yes
|
||||
enable_opus=yes
|
||||
enable_debug=no
|
||||
|
||||
enable_i386=no
|
||||
|
||||
|
||||
TUNNEL_AVAILABLE=$(shell git submodule status ../tunnel 2>/dev/null 1>/dev/null && echo yes)
|
||||
|
|
@ -105,37 +105,45 @@ LINPHONE_OPTIONS=enable_gpl_third_parties=$(enable_gpl_third_parties) \
|
|||
enable_zrtp=$(enable_zrtp) enable_opus=$(enable_opus) \
|
||||
enable_debug=$(enable_debug) enable_ffmpeg=$(enable_ffmpeg) enable_tunnel=$(enable_tunnel)
|
||||
|
||||
armv7_host=armv7-apple-darwin.ios
|
||||
arm64_host=aarch64-apple-darwin.ios
|
||||
i386_host=i386-apple-darwin.ios
|
||||
x86_64_host=x86_64-apple-darwin.ios
|
||||
|
||||
all_archs=armv7 aarch64 i386 x86_64
|
||||
active_arch=$(filter-out i386,$(all_archs))
|
||||
ifeq ($(enable_i386),yes)
|
||||
active_arch+=i386
|
||||
endif
|
||||
|
||||
all_hosts=$(addsuffix -apple-darwin.ios,$(active_arch))
|
||||
|
||||
armv7-%:
|
||||
make -f builder-iphone-os.mk $(LINPHONE_OPTIONS) $*
|
||||
make -f builder-iphone-os.mk host=$(armv7_host) $(LINPHONE_OPTIONS) $*
|
||||
|
||||
arm64-%:
|
||||
make -f builder-iphone-os.mk host=aarch64-apple-darwin $(LINPHONE_OPTIONS) $* V=1 VERBOSE=1
|
||||
make -f builder-iphone-os.mk host=$(arm64_host) $(LINPHONE_OPTIONS) $*
|
||||
|
||||
simu-%:
|
||||
make -f builder-iphone-simulator.mk $(LINPHONE_OPTIONS) $*
|
||||
i386-%:
|
||||
make -f builder-iphone-os.mk host=$(i386_host) $(LINPHONE_OPTIONS) $*
|
||||
|
||||
arm64:
|
||||
make -f builder-iphone-os.mk host=aarch64-apple-darwin $(LINPHONE_OPTIONS) V=1 VERBOSE=1
|
||||
|
||||
x64:
|
||||
make -f builder-iphone-os.mk host=x86_64-apple-darwin.ios $(LINPHONE_OPTIONS)
|
||||
|
||||
x64-%:
|
||||
make -f builder-iphone-os.mk host=x86_64-apple-darwin.ios $(LINPHONE_OPTIONS) $* V=1 VERBOSE=1
|
||||
x86_64-%:
|
||||
make -f builder-iphone-os.mk host=$(x86_64_host) $(LINPHONE_OPTIONS) $*
|
||||
|
||||
|
||||
# sends the target after 'broadcast_' to all sub-architectures (armv7, simu, arm64)
|
||||
# sends the target after 'broadcast_' to all sub-architectures
|
||||
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 host=aarch64-apple-darwin $(LINPHONE_OPTIONS) $*
|
||||
@echo "Broadcasting target '$*' to $(all_hosts)"
|
||||
@for h in $(all_hosts); do \
|
||||
echo "==== starting build for host $$h ===="; \
|
||||
make -f builder-iphone-os.mk host=$$h $(LINPHONE_OPTIONS) $* ; \
|
||||
done
|
||||
|
||||
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) $@
|
||||
@for h in $(all_hosts); do \
|
||||
echo "==== starting build of $@ for host $$h ===="; \
|
||||
make -f builder-iphone-os.mk host=$$h $(LINPHONE_OPTIONS) $@ ; \
|
||||
done
|
||||
|
||||
sdk:
|
||||
make -f builder-iphone-os.mk delivery-sdk
|
||||
|
|
@ -167,9 +175,17 @@ zipres:
|
|||
@tar -C ../.. -czf ../../ios_assets.tar.gz Resources iTunesArtwork
|
||||
@echo Archive 'ios_assets.tar.gz' placed in root directory
|
||||
|
||||
empty:=
|
||||
space:= $(empty) $(empty)
|
||||
arch_opt=$(subst $(space),|,$(all_archs))
|
||||
|
||||
help:
|
||||
@echo "(please read the README file first)"
|
||||
@echo "Available architectures: armv7, simu"
|
||||
@echo "(please read the README.md file first)"
|
||||
@echo "Available architectures: $(all_archs)"
|
||||
@echo "Activated architectures: $(active_arch)"
|
||||
@echo ""
|
||||
@echo "Invoke with 'enable_i386=yes' to add i386 build"
|
||||
@echo ""
|
||||
@echo "Available targets:"
|
||||
@echo ""
|
||||
@echo " * all : builds all architectures and creates the liblinphone sdk"
|
||||
|
|
@ -186,11 +202,9 @@ help:
|
|||
@echo " * clean-[package] : clean the package for all architectures"
|
||||
@echo " * veryclean-[package] : completely clean the package for all architectures"
|
||||
@echo ""
|
||||
@echo " * armv7-build-[package] : builds a package for the armv7 architecture"
|
||||
@echo " * simu-build-[package] : builds a package for the simulator architecture"
|
||||
@echo ""
|
||||
@echo " * [arch]-clean-[package] : clean the package for the selected architecture"
|
||||
@echo " * [arch]-veryclean-[package] : completely clean the package for the selected architecture"
|
||||
@echo " * [$(arch_opt)]-build-[package] : builds a package for the selected architecture"
|
||||
@echo " * [$(arch_opt)]-clean-[package] : clean the package for the selected architecture"
|
||||
@echo " * [$(arch_opt)]-veryclean-[package] : completely clean the package for the selected architecture"
|
||||
@echo ""
|
||||
@echo " * sdk : re-add all generated libraries to the SDK. Use this only after a full build."
|
||||
@echo " * libs : after a rebuild of a subpackage, will mix the new libs in liblinphone-sdk/apple-darwin directory"
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
############################################################################
|
||||
|
||||
host?=armv7-apple-darwin
|
||||
enable_i386?=no
|
||||
config_site:=iphone-config.site
|
||||
library_mode:= --disable-shared --enable-static
|
||||
linphone_configure_controls = \
|
||||
|
|
@ -228,18 +229,27 @@ multi-arch:
|
|||
for archive in $$arm_archives ; do \
|
||||
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= ; \
|
||||
x64_path=`echo $$archive | sed -e "s/armv7/x86_64/" | sed -e "s/darwin/darwin.ios/"` ;\
|
||||
destpath=`echo $$archive | sed -e "s/-debug//" | sed -e "s/armv7-//"` ;\
|
||||
all_paths=`echo $$archive $$arm64_path`; \
|
||||
all_archs="armv7,aarch64"; \
|
||||
mkdir -p `dirname $$destpath` ; \
|
||||
if test $(enable_i386) = yes ; then \
|
||||
if test -f "$$i386_path"; then \
|
||||
all_paths=`echo $$all_paths $$i386_path`; \
|
||||
all_archs="$$all_archs,i386" ; \
|
||||
else \
|
||||
echo "WARNING: archive `basename $$archive` exists in arm tree but does not exists in i386 tree: $$i386_path."; \
|
||||
fi; \
|
||||
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; \
|
||||
if test -f "$$x64_path"; then \
|
||||
all_paths=`echo $$all_paths $$x64_path`; \
|
||||
all_archs="$$all_archs,x86_64" ; \
|
||||
else \
|
||||
echo "WARNING: archive `basename $$archive` exists in arm tree but does not exists in i386 tree."; \
|
||||
fi \
|
||||
echo "WARNING: archive `basename $$archive` exists in arm tree but does not exists in x86_64 tree: $$x64_path."; \
|
||||
fi; \
|
||||
echo "[$$all_archs] Mixing `basename $$archive` in $$destpath"; \
|
||||
lipo -create $$all_paths -output $$destpath; \
|
||||
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 ; \
|
||||
|
|
|
|||
|
|
@ -1,24 +0,0 @@
|
|||
############################################################################
|
||||
# builder-iphone-simulator.mk
|
||||
# Copyright (C) 2009 Belledonne Communications,Grenoble France
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
############################################################################
|
||||
host:=i386-apple-darwin
|
||||
include builder-iphone-os.mk
|
||||
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 29873fe5e1426aea4247b3146ca8fc5c017ec480
|
||||
Subproject commit 24e0c10de6326d929050ae42ec71ede5fbabaa49
|
||||
Loading…
Add table
Reference in a new issue