Updated Makefile/Readme

This commit is contained in:
Sylvain Berfini 2012-11-27 12:06:05 +01:00
parent 4250899364
commit 93c68bc9ff
2 changed files with 24 additions and 16 deletions

View file

@ -6,6 +6,16 @@ TOPDIR=$(shell pwd)
PATCH_FFMPEG=$(shell cd submodules/externals/ffmpeg && git status | grep neon) PATCH_FFMPEG=$(shell cd submodules/externals/ffmpeg && git status | grep neon)
LINPHONE_VERSION=$(shell cd submodules/linphone && git describe) LINPHONE_VERSION=$(shell cd submodules/linphone && git describe)
BUILD_X264=0
BUILD_AMRNB=light
BUILD_AMRWB=1
BUILD_GPLV3_ZRTP=0
BUILD_SILK=0
BUILD_G729=0
BUILD_TUNNEL=0
BUILD_WEBRTC_AECM=1
USE_JAVAH=1
all: update-project prepare-sources install-apk run-linphone all: update-project prepare-sources install-apk run-linphone
prepare-ffmpeg: prepare-ffmpeg:
@ -72,7 +82,7 @@ prepare-mediastreamer2:
prepare-sources: prepare-ffmpeg prepare-ilbc prepare-vpx prepare-silk prepare-srtp prepare-mediastreamer2 prepare-sources: prepare-ffmpeg prepare-ilbc prepare-vpx prepare-silk prepare-srtp prepare-mediastreamer2
generate-libs: generate-libs:
$(NDK_PATH)/ndk-build LINPHONE_VERSION=$(LINPHONE_VERSION) BUILD_SILK=1 BUILD_AMRNB=full BUILD_WEBRTC_AECM=1 BUILD_GPLV3_ZRTP=1 USE_JAVAH=1 -j$(NUMCPUS) $(NDK_PATH)/ndk-build LINPHONE_VERSION=$(LINPHONE_VERSION) BUILD_X264=$(BUILD_X264) BUILD_AMRNB=$(BUILD_AMRNB) BUILD_AMRWB=$(BUILD_AMRWB) BUILD_GPLV3_ZRTP=$(BUILD_GPLV3_ZRTP) BUILD_SILK=$(BUILD_SILK) BUILD_G729=$(BUILD_G729) BUILD_TUNNEL=$(BUILD_TUNNEL) BUILD_WEBRTC_AECM=$(BUILD_WEBRTC_AECM) USE_JAVAH=$(USE_JAVAH) -j$(NUMCPUS)
update-project: update-project:
$(SDK_PATH)/android update project --path . $(SDK_PATH)/android update project --path .

28
README
View file

@ -3,7 +3,7 @@
To build liblinphone for Android, you must: To build liblinphone for Android, you must:
0) download the Android sdk with platform-tools >= 13, tools >= 20 (20.0.3 for linux) and sdk platform >= 16, then add both 'tools' and 'platform-tools' folders in your path. 0) download the Android sdk with platform-tools >= 13, tools >= 20 (20.0.3 for linux) and sdk platform >= 16, then add both 'tools' and 'platform-tools' folders in your path.
1) download the Android ndk (>=r5c) from google and add it to your path. 1) download the Android ndk (>=r8b) from google and add it to your path.
2) install the autotools: autoconf, automake, aclocal, libtoolize pkgconfig 2) install the autotools: autoconf, automake, aclocal, libtoolize pkgconfig
2bis) on some 64 bits systems you'll need the ia32-libs package 2bis) on some 64 bits systems you'll need the ia32-libs package
3) run the Makefile script in the top level directory. This will download iLBC source files and convert some assembly files in VP8 project. 3) run the Makefile script in the top level directory. This will download iLBC source files and convert some assembly files in VP8 project.
@ -11,20 +11,18 @@ To build liblinphone for Android, you must:
To create an apk with a different package name, you need to edit the custom_rules.xml file: To create an apk with a different package name, you need to edit the custom_rules.xml file:
1) look for the property named "linphone.package.name" and change it value accordingly 1) look for the property named "linphone.package.name" and change it value accordingly
2) run again the Makefile script. You can only regenerate the apk if you already built it before. 2) run again the Makefile script by calling "make"
$ make install-apk
Some options can be passed to ndk-build, like "ndk-build SOME_OPTION=SOME_VALUE". Put them into the Makefile script, under the generate-libs target Some options can be passed to make, like "make SOME_OPTION=SOME_VALUE".
Option Name | Possible values | Default value Option Name | Possible values | Default value
------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------
BUILD_X264 0 (don't build x264) or 1 (build x264) BUILD_X264 0 (don't build x264) or 1 (build x264) | 0
BUILD_AMRNB 0 (don't build amrnb codec), light (try to use amrnb codec from android), full (build your own amrnb codec) | light BUILD_AMRNB 0 (don't build amrnb codec), light (try to use amrnb codec from android), full (build your own amrnb codec) | light
BUILD_AMRWB 0 (don't build amrwb codec), 1 (build your own amrwb codec) | 1 BUILD_AMRWB 0 (don't build amrwb codec), 1 (build your own amrwb codec) | 1
BUILD_GPLV3_ZRTP 0 (don't support ZRTP), 1 (support ZRTP and make the whole program GPLv3) BUILD_GPLV3_ZRTP 0 (don't support ZRTP), 1 (support ZRTP and make the whole program GPLv3) | 0
BUILD_SILK 0 (don't build silk plugin), 1 (build silk) [silk is Skype nonfree patented audio codec] BUILD_SILK 0 (don't build silk plugin), 1 (build silk) [silk is Skype nonfree patented audio codec] | 0
BUILD_G729 0 (don't build g729 plugin), 1 (build g729) [g729 is nonfree patented audio codec, contact Sipro lab for more details] BUILD_G729 0 (don't build g729 plugin), 1 (build g729) [g729 is nonfree patented audio codec, contact Sipro lab for more details] | 0
BUILD_TUNNEL 0 (don't build tunnel), 1 (build tunnel) [requires a tunnel implementation in submodules/linphone/tunnel] BUILD_TUNNEL 0 (don't build tunnel), 1 (build tunnel) [requires a tunnel implementation in submodules/linphone/tunnel] | 0
BUILD_WEBRTC_AECM 0 (don't build echo canceler), 1 (build echo canceler) | 1
In order to use ZRTP you also need to define the media_encryption property to USE_JAVAH 0 (don't generate header), 1 (generate header for linphone_core_jni) [used to check errors at liblinphone compilation] | 1
"zrtp" in the sip section of linphonerc file.