make zrtp compilation optional

This commit is contained in:
Simon Morlat 2012-03-26 12:27:24 +02:00
parent a1f44377ae
commit da017901fc
3 changed files with 29 additions and 11 deletions

17
README
View file

@ -36,19 +36,24 @@ BUILDING THE SDK
* GPL third parties versus non GPL third parties
This sdk can be generated in 2 flavors. Firt 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.
This sdk can be generated in 2 flavors. Firt 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.
To generate the liblinphone multi arch sdk in GPL mode, do:
To generate the liblinphone multi arch sdk in GPL mode, do:
$ cd submodules/build
$ make all
ALTERNATIVELY, you can force liblinphone to use only non GPL code except for liblinphone, mediastremer2, ortp, exosip, osip.
If you choose this flavor, your final application is still subject to GPL except if you have a commercial license for liblinphone, mediastremer2, ortp, exosip, osip.
ALTERNATIVELY, you can force liblinphone to use only non GPL code except for liblinphone, mediastremer2, ortp, exosip, osip.
If you choose this flavor, your final application is still subject to GPL except if you have a commercial license for liblinphone, mediastremer2, ortp, exosip, osip.
To generate the liblinphone multi arch sdkin non GPL mode, do:
To generate the liblinphone multi arch sdkin non GPL mode, do:
$ cd submodules/build
$ make all enable_gpl_third_parties=no
* ZRTP support
You can enable ZRTP support in GPL mode only, by adding "enable_zrtp=yes" to the make command, for example:
$ make all enable_gpl_third_parties=yes enable_zrtp=yes
The resulting sdk is in liblinphone-sdk/ directory.

View file

@ -20,6 +20,7 @@
#
############################################################################
enable_gpl_third_parties=yes
enable_zrtp=no
.NOTPARALLEL all: build warning
ifeq ($(enable_gpl_third_parties),yes)
@ -39,12 +40,18 @@ warning:
@echo "*****linphone SDK without GPL code ******"
@echo "*****************************************************************"
@echo "*****************************************************************"
ifeq($(enable_zrtp),yes)
@echo "ZRTP is not available in non-gpl build."
enable_zrtp=no
endif
endif
LINPHONE_OPTIONS="enable_gpl_third_parties=$(enable_gpl_third_parties) enable_zrtp=$(enable_zrtp)"
build:
make -f builder-iphone-os.mk all enable_gpl_third_parties=$(enable_gpl_third_parties) \
&& make -f builder-iphone-simulator.mk all enable_gpl_third_parties=$(enable_gpl_third_parties)\
&& make -f builder-iphone-os.mk host=armv7-apple-darwin all enable_gpl_third_parties=$(enable_gpl_third_parties)\
make -f builder-iphone-os.mk all $(LINPHONE_OPTIONS) \
&& make -f builder-iphone-simulator.mk all $(LINPHONE_OPTIONS) \
&& make -f builder-iphone-os.mk host=armv7-apple-darwin all $(LINPHONE_OPTIONS) \
&& make -f builder-iphone-os.mk delivery-sdk
ipa: build

View file

@ -38,6 +38,12 @@ linphone_configure_controls= \
--disable-tests \
--with-srtp=$(prefix)
ifeq ($(enable_zrtp),yes)
linphone_configure_controls+= --enable-zrtp
else
linphone_configure_controls+= --disable-zrtp
endif
#path
BUILDER_SRC_DIR?=$(shell pwd)/../
BUILDER_BUILD_DIR?=$(shell pwd)/../build-$(host)
@ -60,11 +66,11 @@ $(LINPHONE_BUILD_DIR)/disable_gpl_third_parties:
cd $(LINPHONE_BUILD_DIR) && rm -f Makefile && rm -f oRTP/Makefile && rm -f mediastreamer2/Makefile
ifeq ($(enable_gpl_third_parties),yes)
linphone_configure_controls+= --enable-ffmpeg --enable-zrtp
linphone_configure_controls+= --enable-ffmpeg
detect_gpl_mode_switch: $(LINPHONE_BUILD_DIR)/enable_gpl_third_parties
else
linphone_configure_controls+= --disable-ffmpeg --disable-zrtp
linphone_configure_controls+= --disable-ffmpeg
detect_gpl_mode_switch: $(LINPHONE_BUILD_DIR)/disable_gpl_third_parties
endif