Alexandre Lision | fed2a64 | 2014-01-10 12:05:47 -0500 | [diff] [blame] | 1 | # Copyright (C) 2004-2014 Savoir-Faire Linux Inc. |
| 2 | # |
Alexandre Lision | 8690e6f | 2014-08-01 10:15:12 -0400 | [diff] [blame] | 3 | # Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com> |
| 4 | # Adrien Beraud <adrien.beraud@gmail.com> |
Alexandre Lision | fed2a64 | 2014-01-10 12:05:47 -0500 | [diff] [blame] | 5 | # |
| 6 | # This program is free software; you can redistribute it and/or modify |
| 7 | # it under the terms of the GNU General Public License as published by |
| 8 | # the Free Software Foundation; either version 3 of the License, or |
| 9 | # (at your option) any later version. |
| 10 | # This program is distributed in the hope that it will be useful, |
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | # GNU General Public License for more details. |
| 14 | # |
| 15 | # You should have received a copy of the GNU General Public License |
| 16 | # along with this program; if not, write to the Free Software |
| 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 18 | # |
| 19 | # Additional permission under GNU GPL version 3 section 7: |
| 20 | # |
| 21 | # If you modify this program, or any covered work, by linking or |
| 22 | # combining it with the OpenSSL project's OpenSSL library (or a |
| 23 | # modified version of that library), containing parts covered by the |
| 24 | # terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc. |
| 25 | # grants you additional permission to convey the resulting work. |
| 26 | # Corresponding Source for a non-source form of such a combination |
| 27 | # shall include the source code for the parts of OpenSSL used as well |
| 28 | # as that of the covered work. |
| 29 | |
alision | 3ea8f3c | 2013-07-16 17:35:35 -0400 | [diff] [blame] | 30 | LOCAL_PATH:= $(call my-dir) |
alision | 3ea8f3c | 2013-07-16 17:35:35 -0400 | [diff] [blame] | 31 | |
Alexandre Lision | 0ac0685 | 2014-08-06 09:54:30 -0400 | [diff] [blame] | 32 | $(info SFLPHONE_CONTRIB=$(SFLPHONE_CONTRIB)) |
| 33 | $(info SFLPHONE_SRC=$(SFLPHONE_SRC)) |
alision | 3ea8f3c | 2013-07-16 17:35:35 -0400 | [diff] [blame] | 34 | |
Alexandre Lision | 399db75 | 2014-09-03 10:27:56 -0400 | [diff] [blame] | 35 | |
| 36 | include $(CLEAR_VARS) |
| 37 | LOCAL_MODULE := sflphone |
Tristan Matthews | eaaa5ba | 2014-10-09 04:23:06 -0400 | [diff] [blame^] | 38 | LOCAL_SRC_FILES := ../$(SFLPHONE_BUILD_DIR)/src/.libs/libsflphone.so |
Alexandre Lision | 399db75 | 2014-09-03 10:27:56 -0400 | [diff] [blame] | 39 | include $(PREBUILT_SHARED_LIBRARY) |
| 40 | |
Alexandre Lision | 17b60c3 | 2014-02-03 14:37:59 -0500 | [diff] [blame] | 41 | include $(CLEAR_VARS) |
alision | 3ea8f3c | 2013-07-16 17:35:35 -0400 | [diff] [blame] | 42 | VERSION="1.1.0" |
| 43 | MY_PREFIX=/sdcard |
| 44 | MY_DATADIR=/data/data |
alision | 3ea8f3c | 2013-07-16 17:35:35 -0400 | [diff] [blame] | 45 | |
Alexandre Lision | 449ca84 | 2014-08-05 11:22:50 -0400 | [diff] [blame] | 46 | ARCH=$(ANDROID_ABI) |
| 47 | |
Alexandre Lision | 399db75 | 2014-09-03 10:27:56 -0400 | [diff] [blame] | 48 | CPP_STATIC= $(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++$(CXXSTL)/libs/$(ARCH)/libgnustl_static.a \ |
| 49 | $(SFLPHONE_CONTRIB)/lib/libucommon.a \ |
| 50 | $(SFLPHONE_CONTRIB)/lib/libccrtp.a \ |
| 51 | $(SFLPHONE_CONTRIB)/lib/libpjlib-util-arm-unknown-linux-androideabi.a \ |
| 52 | $(SFLPHONE_CONTRIB)/lib/libpj-arm-unknown-linux-androideabi.a \ |
| 53 | $(SFLPHONE_CONTRIB)/lib/libogg.a \ |
| 54 | $(SFLPHONE_CONTRIB)/lib/libFLAC.a \ |
| 55 | $(SFLPHONE_CONTRIB)/lib/libgcrypt.a \ |
| 56 | $(SFLPHONE_CONTRIB)/lib/libgpg-error.a \ |
| 57 | |
| 58 | |
Alexandre Lision | 449ca84 | 2014-08-05 11:22:50 -0400 | [diff] [blame] | 59 | |
Alexandre Lision | 907ed2e | 2014-02-04 10:33:09 -0500 | [diff] [blame] | 60 | LOCAL_CPPFLAGS += -frtti |
| 61 | LOCAL_CPPFLAGS += -fexceptions |
Alexandre Lision | 950e9d6 | 2013-12-02 15:09:01 -0500 | [diff] [blame] | 62 | |
Alexandre Lision | 719259d | 2014-08-07 12:10:13 -0400 | [diff] [blame] | 63 | LOCAL_SRC_FILES := sflphone_wrapper.cpp |
Alexandre Lision | c469187 | 2014-01-31 12:04:39 -0500 | [diff] [blame] | 64 | |
Alexandre Lision | 0ac0685 | 2014-08-06 09:54:30 -0400 | [diff] [blame] | 65 | LOCAL_C_INCLUDES += $(LOCAL_PATH) \ |
Tristan Matthews | eaaa5ba | 2014-10-09 04:23:06 -0400 | [diff] [blame^] | 66 | $(SFLPHONE_BUILD_DIR)/ \ # for config.h |
Alexandre Lision | 9abb7c9 | 2014-08-04 19:22:55 -0400 | [diff] [blame] | 67 | $(SFLPHONE_SRC)/daemon \ |
Alexandre Lision | 0ac0685 | 2014-08-06 09:54:30 -0400 | [diff] [blame] | 68 | $(SFLPHONE_SRC)/daemon/src \ |
Tristan Matthews | eaaa5ba | 2014-10-09 04:23:06 -0400 | [diff] [blame^] | 69 | $(SFLPHONE_SRC)/daemon/contrib/$(TARGET_TUPLE)/include |
alision | 3ea8f3c | 2013-07-16 17:35:35 -0400 | [diff] [blame] | 70 | |
Alexandre Lision | 9abb7c9 | 2014-08-04 19:22:55 -0400 | [diff] [blame] | 71 | LOCAL_MODULE := libsflphonejni |
alision | 3ea8f3c | 2013-07-16 17:35:35 -0400 | [diff] [blame] | 72 | |
| 73 | LOCAL_CPPFLAGS += $(NETWORKMANAGER) \ |
Alexandre Lision | a1ad1c3 | 2013-10-15 16:35:20 -0400 | [diff] [blame] | 74 | -DCCPP_PREFIX \ |
| 75 | -DCODECS_DIR=\"/usr/lib/sflphone/audio/codec\" \ |
| 76 | -DPREFIX=\"$(MY_PREFIX)\" \ |
| 77 | -DPROGSHAREDIR=\"${MY_DATADIR}/sflphone\" \ |
| 78 | -DHAVE_CONFIG_H \ |
Alexandre Lision | 6213817 | 2013-10-17 11:52:45 -0400 | [diff] [blame] | 79 | -DHAVE_SPEEX_CODEC \ |
Alexandre Lision | a1ad1c3 | 2013-10-15 16:35:20 -0400 | [diff] [blame] | 80 | -DHAVE_GSM_CODEC \ |
| 81 | -w \ |
Alexandre Lision | 907ed2e | 2014-02-04 10:33:09 -0500 | [diff] [blame] | 82 | -std=c++11 -fexceptions -fpermissive \ |
Alexandre Lision | a1ad1c3 | 2013-10-15 16:35:20 -0400 | [diff] [blame] | 83 | -DAPP_NAME=\"sflphone\" \ |
| 84 | -DSWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON \ |
| 85 | -DDEBUG_DIRECTOR_OWNED \ |
| 86 | -DPJ_AUTOCONF=1 |
alision | 3ea8f3c | 2013-07-16 17:35:35 -0400 | [diff] [blame] | 87 | |
Alexandre Lision | 17b60c3 | 2014-02-03 14:37:59 -0500 | [diff] [blame] | 88 | LOCAL_LDLIBS += -lz \ |
| 89 | -llog \ |
| 90 | -lOpenSLES \ |
Alexandre Lision | 449ca84 | 2014-08-05 11:22:50 -0400 | [diff] [blame] | 91 | -L$(SFLPHONE_CONTRIB)/lib \ |
Tristan Matthews | eaaa5ba | 2014-10-09 04:23:06 -0400 | [diff] [blame^] | 92 | -L$(SFLPHONE_BUILD_DIR)/src/.libs \ |
| 93 | $(SFLPHONE_BUILD_DIR)/src/.libs/libsflphone.a \ |
Alexandre Lision | 449ca84 | 2014-08-05 11:22:50 -0400 | [diff] [blame] | 94 | -lexpat -lhogweed -lpj-arm-unknown-linux-androideabi \ |
| 95 | -lpjsip-simple-arm-unknown-linux-androideabi \ |
| 96 | -lpjlib-util-arm-unknown-linux-androideabi \ |
| 97 | -lpjsip-ua-arm-unknown-linux-androideabi \ |
Tristan Matthews | 1b5d132 | 2014-09-29 17:29:16 -0400 | [diff] [blame] | 98 | -lspeexdsp -lvorbisfile -lyaml-cpp \ |
Tristan Matthews | 6dab5d9 | 2014-10-08 16:42:34 -0400 | [diff] [blame] | 99 | -lFLAC -liax -lsrtp-arm-unknown-linux-androideabi -lgcrypt -lnettle \ |
Alexandre Lision | 449ca84 | 2014-08-05 11:22:50 -0400 | [diff] [blame] | 100 | -lpjmedia-arm-unknown-linux-androideabi \ |
Tristan Matthews | 6dab5d9 | 2014-10-08 16:42:34 -0400 | [diff] [blame] | 101 | -lpjsua2-arm-unknown-linux-androideabi -lgmp \ |
Alexandre Lision | 449ca84 | 2014-08-05 11:22:50 -0400 | [diff] [blame] | 102 | -logg -lpjmedia-audiodev-arm-unknown-linux-androideabi \ |
Tristan Matthews | 1b5d132 | 2014-09-29 17:29:16 -0400 | [diff] [blame] | 103 | -lpjsua-arm-unknown-linux-androideabi -lucommon \ |
Tristan Matthews | 6dab5d9 | 2014-10-08 16:42:34 -0400 | [diff] [blame] | 104 | -lgnutls -lopus \ |
Alexandre Lision | 449ca84 | 2014-08-05 11:22:50 -0400 | [diff] [blame] | 105 | -lresample-arm-unknown-linux-androideabi -lusecure \ |
Tristan Matthews | 6dab5d9 | 2014-10-08 16:42:34 -0400 | [diff] [blame] | 106 | -lgnutls-xssl -lpcre \ |
Alexandre Lision | 449ca84 | 2014-08-05 11:22:50 -0400 | [diff] [blame] | 107 | -lsamplerate -luuid -lccrtp -lgpg-error -lpcrecpp \ |
| 108 | -lpjnath-arm-unknown-linux-androideabi -lsndfile -lvorbis \ |
| 109 | -lcommoncpp -lgsm -lpcreposix -lpjsip-arm-unknown-linux-androideabi \ |
| 110 | -lspeex -lvorbisenc \ |
| 111 | $(CPP_STATIC) |
alision | 3ea8f3c | 2013-07-16 17:35:35 -0400 | [diff] [blame] | 112 | |
Alexandre Lision | 7c6f4a6 | 2013-09-05 13:27:01 -0400 | [diff] [blame] | 113 | include $(BUILD_SHARED_LIBRARY) |
Alexandre Lision | 399db75 | 2014-09-03 10:27:56 -0400 | [diff] [blame] | 114 | |
| 115 | ########### Codecs ############### |
| 116 | |
| 117 | include $(CLEAR_VARS) |
| 118 | LOCAL_MODULE := ulaw |
Tristan Matthews | eaaa5ba | 2014-10-09 04:23:06 -0400 | [diff] [blame^] | 119 | LOCAL_SRC_FILES := ../$(SFLPHONE_BUILD_DIR)/src/audio/codecs/libcodec_ulaw.so |
Alexandre Lision | 399db75 | 2014-09-03 10:27:56 -0400 | [diff] [blame] | 120 | include $(PREBUILT_SHARED_LIBRARY) |
| 121 | |
| 122 | include $(CLEAR_VARS) |
| 123 | LOCAL_MODULE := alaw |
Tristan Matthews | eaaa5ba | 2014-10-09 04:23:06 -0400 | [diff] [blame^] | 124 | LOCAL_SRC_FILES := ../$(SFLPHONE_BUILD_DIR)/src/audio/codecs/libcodec_alaw.so |
Alexandre Lision | 399db75 | 2014-09-03 10:27:56 -0400 | [diff] [blame] | 125 | include $(PREBUILT_SHARED_LIBRARY) |
| 126 | |
| 127 | include $(CLEAR_VARS) |
| 128 | LOCAL_MODULE := g722 |
Tristan Matthews | eaaa5ba | 2014-10-09 04:23:06 -0400 | [diff] [blame^] | 129 | LOCAL_SRC_FILES := ../$(SFLPHONE_BUILD_DIR)/src/audio/codecs/libcodec_g722.so |
Alexandre Lision | 399db75 | 2014-09-03 10:27:56 -0400 | [diff] [blame] | 130 | include $(PREBUILT_SHARED_LIBRARY) |
| 131 | |
| 132 | include $(CLEAR_VARS) |
| 133 | LOCAL_MODULE := speex_nb |
Tristan Matthews | eaaa5ba | 2014-10-09 04:23:06 -0400 | [diff] [blame^] | 134 | LOCAL_SRC_FILES := ../$(SFLPHONE_BUILD_DIR)/src/audio/codecs/libcodec_speex_nb.so |
Alexandre Lision | 399db75 | 2014-09-03 10:27:56 -0400 | [diff] [blame] | 135 | include $(PREBUILT_SHARED_LIBRARY) |
| 136 | |
| 137 | include $(CLEAR_VARS) |
| 138 | LOCAL_MODULE := speex_ub |
Tristan Matthews | eaaa5ba | 2014-10-09 04:23:06 -0400 | [diff] [blame^] | 139 | LOCAL_SRC_FILES := ../$(SFLPHONE_BUILD_DIR)/src/audio/codecs/libcodec_speex_ub.so |
Alexandre Lision | 399db75 | 2014-09-03 10:27:56 -0400 | [diff] [blame] | 140 | include $(PREBUILT_SHARED_LIBRARY) |
| 141 | |
| 142 | include $(CLEAR_VARS) |
| 143 | LOCAL_MODULE := speex_wb |
Tristan Matthews | eaaa5ba | 2014-10-09 04:23:06 -0400 | [diff] [blame^] | 144 | LOCAL_SRC_FILES := ../$(SFLPHONE_BUILD_DIR)/src/audio/codecs/libcodec_speex_wb.so |
Alexandre Lision | 399db75 | 2014-09-03 10:27:56 -0400 | [diff] [blame] | 145 | include $(PREBUILT_SHARED_LIBRARY) |
| 146 | |
| 147 | include $(CLEAR_VARS) |
| 148 | LOCAL_MODULE := opus |
Tristan Matthews | eaaa5ba | 2014-10-09 04:23:06 -0400 | [diff] [blame^] | 149 | LOCAL_SRC_FILES := ../$(SFLPHONE_BUILD_DIR)/src/audio/codecs/libcodec_opus.so |
Alexandre Lision | 399db75 | 2014-09-03 10:27:56 -0400 | [diff] [blame] | 150 | include $(PREBUILT_SHARED_LIBRARY) |
| 151 | |
| 152 | include $(CLEAR_VARS) |
| 153 | LOCAL_MODULE := gsm |
Tristan Matthews | eaaa5ba | 2014-10-09 04:23:06 -0400 | [diff] [blame^] | 154 | LOCAL_SRC_FILES := ../$(SFLPHONE_BUILD_DIR)/src/audio/codecs/libcodec_gsm.so |
Alexandre Lision | 399db75 | 2014-09-03 10:27:56 -0400 | [diff] [blame] | 155 | include $(PREBUILT_SHARED_LIBRARY) |
| 156 | |
| 157 | include $(CLEAR_VARS) |
| 158 | LOCAL_MODULE := g729 |
Tristan Matthews | eaaa5ba | 2014-10-09 04:23:06 -0400 | [diff] [blame^] | 159 | LOCAL_SRC_FILES := ../$(SFLPHONE_BUILD_DIR)/src/audio/codecs/libcodec_g729.so |
Alexandre Lision | 399db75 | 2014-09-03 10:27:56 -0400 | [diff] [blame] | 160 | include $(PREBUILT_SHARED_LIBRARY) |