blob: 38b788d7d4808a1dce2c2e99aaebc16dd39ee1a0 [file] [log] [blame]
Alexandre Lisionfed2a642014-01-10 12:05:47 -05001 # Copyright (C) 2004-2014 Savoir-Faire Linux Inc.
2 #
Alexandre Lision8690e6f2014-08-01 10:15:12 -04003 # Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
4 # Adrien Beraud <adrien.beraud@gmail.com>
Alexandre Lisionfed2a642014-01-10 12:05:47 -05005 #
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
alision3ea8f3c2013-07-16 17:35:35 -040030LOCAL_PATH:= $(call my-dir)
alision3ea8f3c2013-07-16 17:35:35 -040031
Alexandre Lision0ac06852014-08-06 09:54:30 -040032$(info SFLPHONE_CONTRIB=$(SFLPHONE_CONTRIB))
33$(info SFLPHONE_SRC=$(SFLPHONE_SRC))
alision3ea8f3c2013-07-16 17:35:35 -040034
Alexandre Lision399db752014-09-03 10:27:56 -040035
36include $(CLEAR_VARS)
37LOCAL_MODULE := sflphone
Tristan Matthewseaaa5ba2014-10-09 04:23:06 -040038LOCAL_SRC_FILES := ../$(SFLPHONE_BUILD_DIR)/src/.libs/libsflphone.so
Alexandre Lision399db752014-09-03 10:27:56 -040039include $(PREBUILT_SHARED_LIBRARY)
40
Alexandre Lision17b60c32014-02-03 14:37:59 -050041include $(CLEAR_VARS)
alision3ea8f3c2013-07-16 17:35:35 -040042VERSION="1.1.0"
43MY_PREFIX=/sdcard
44MY_DATADIR=/data/data
alision3ea8f3c2013-07-16 17:35:35 -040045
Alexandre Lision449ca842014-08-05 11:22:50 -040046ARCH=$(ANDROID_ABI)
47
Alexandre Lision399db752014-09-03 10:27:56 -040048CPP_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 Lision449ca842014-08-05 11:22:50 -040059
Alexandre Lision907ed2e2014-02-04 10:33:09 -050060LOCAL_CPPFLAGS += -frtti
61LOCAL_CPPFLAGS += -fexceptions
Alexandre Lision950e9d62013-12-02 15:09:01 -050062
Alexandre Lision719259d2014-08-07 12:10:13 -040063LOCAL_SRC_FILES := sflphone_wrapper.cpp
Alexandre Lisionc4691872014-01-31 12:04:39 -050064
Alexandre Lision0ac06852014-08-06 09:54:30 -040065LOCAL_C_INCLUDES += $(LOCAL_PATH) \
Tristan Matthewseaaa5ba2014-10-09 04:23:06 -040066 $(SFLPHONE_BUILD_DIR)/ \ # for config.h
Alexandre Lision9abb7c92014-08-04 19:22:55 -040067 $(SFLPHONE_SRC)/daemon \
Alexandre Lision0ac06852014-08-06 09:54:30 -040068 $(SFLPHONE_SRC)/daemon/src \
Tristan Matthewseaaa5ba2014-10-09 04:23:06 -040069 $(SFLPHONE_SRC)/daemon/contrib/$(TARGET_TUPLE)/include
alision3ea8f3c2013-07-16 17:35:35 -040070
Alexandre Lision9abb7c92014-08-04 19:22:55 -040071LOCAL_MODULE := libsflphonejni
alision3ea8f3c2013-07-16 17:35:35 -040072
73LOCAL_CPPFLAGS += $(NETWORKMANAGER) \
Alexandre Lisiona1ad1c32013-10-15 16:35:20 -040074 -DCCPP_PREFIX \
75 -DCODECS_DIR=\"/usr/lib/sflphone/audio/codec\" \
76 -DPREFIX=\"$(MY_PREFIX)\" \
77 -DPROGSHAREDIR=\"${MY_DATADIR}/sflphone\" \
78 -DHAVE_CONFIG_H \
Alexandre Lision62138172013-10-17 11:52:45 -040079 -DHAVE_SPEEX_CODEC \
Alexandre Lisiona1ad1c32013-10-15 16:35:20 -040080 -DHAVE_GSM_CODEC \
81 -w \
Alexandre Lision907ed2e2014-02-04 10:33:09 -050082 -std=c++11 -fexceptions -fpermissive \
Alexandre Lisiona1ad1c32013-10-15 16:35:20 -040083 -DAPP_NAME=\"sflphone\" \
84 -DSWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON \
85 -DDEBUG_DIRECTOR_OWNED \
86 -DPJ_AUTOCONF=1
alision3ea8f3c2013-07-16 17:35:35 -040087
Alexandre Lision17b60c32014-02-03 14:37:59 -050088LOCAL_LDLIBS += -lz \
89 -llog \
90 -lOpenSLES \
Alexandre Lision449ca842014-08-05 11:22:50 -040091 -L$(SFLPHONE_CONTRIB)/lib \
Tristan Matthewseaaa5ba2014-10-09 04:23:06 -040092 -L$(SFLPHONE_BUILD_DIR)/src/.libs \
93 $(SFLPHONE_BUILD_DIR)/src/.libs/libsflphone.a \
Alexandre Lision449ca842014-08-05 11:22:50 -040094 -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 Matthews1b5d1322014-09-29 17:29:16 -040098 -lspeexdsp -lvorbisfile -lyaml-cpp \
Tristan Matthews6dab5d92014-10-08 16:42:34 -040099 -lFLAC -liax -lsrtp-arm-unknown-linux-androideabi -lgcrypt -lnettle \
Alexandre Lision449ca842014-08-05 11:22:50 -0400100 -lpjmedia-arm-unknown-linux-androideabi \
Tristan Matthews6dab5d92014-10-08 16:42:34 -0400101 -lpjsua2-arm-unknown-linux-androideabi -lgmp \
Alexandre Lision449ca842014-08-05 11:22:50 -0400102 -logg -lpjmedia-audiodev-arm-unknown-linux-androideabi \
Tristan Matthews1b5d1322014-09-29 17:29:16 -0400103 -lpjsua-arm-unknown-linux-androideabi -lucommon \
Tristan Matthews6dab5d92014-10-08 16:42:34 -0400104 -lgnutls -lopus \
Alexandre Lision449ca842014-08-05 11:22:50 -0400105 -lresample-arm-unknown-linux-androideabi -lusecure \
Tristan Matthews6dab5d92014-10-08 16:42:34 -0400106 -lgnutls-xssl -lpcre \
Alexandre Lision449ca842014-08-05 11:22:50 -0400107 -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)
alision3ea8f3c2013-07-16 17:35:35 -0400112
Alexandre Lision7c6f4a62013-09-05 13:27:01 -0400113include $(BUILD_SHARED_LIBRARY)
Alexandre Lision399db752014-09-03 10:27:56 -0400114
115########### Codecs ###############
116
117include $(CLEAR_VARS)
118LOCAL_MODULE := ulaw
Tristan Matthewseaaa5ba2014-10-09 04:23:06 -0400119LOCAL_SRC_FILES := ../$(SFLPHONE_BUILD_DIR)/src/audio/codecs/libcodec_ulaw.so
Alexandre Lision399db752014-09-03 10:27:56 -0400120include $(PREBUILT_SHARED_LIBRARY)
121
122include $(CLEAR_VARS)
123LOCAL_MODULE := alaw
Tristan Matthewseaaa5ba2014-10-09 04:23:06 -0400124LOCAL_SRC_FILES := ../$(SFLPHONE_BUILD_DIR)/src/audio/codecs/libcodec_alaw.so
Alexandre Lision399db752014-09-03 10:27:56 -0400125include $(PREBUILT_SHARED_LIBRARY)
126
127include $(CLEAR_VARS)
128LOCAL_MODULE := g722
Tristan Matthewseaaa5ba2014-10-09 04:23:06 -0400129LOCAL_SRC_FILES := ../$(SFLPHONE_BUILD_DIR)/src/audio/codecs/libcodec_g722.so
Alexandre Lision399db752014-09-03 10:27:56 -0400130include $(PREBUILT_SHARED_LIBRARY)
131
132include $(CLEAR_VARS)
133LOCAL_MODULE := speex_nb
Tristan Matthewseaaa5ba2014-10-09 04:23:06 -0400134LOCAL_SRC_FILES := ../$(SFLPHONE_BUILD_DIR)/src/audio/codecs/libcodec_speex_nb.so
Alexandre Lision399db752014-09-03 10:27:56 -0400135include $(PREBUILT_SHARED_LIBRARY)
136
137include $(CLEAR_VARS)
138LOCAL_MODULE := speex_ub
Tristan Matthewseaaa5ba2014-10-09 04:23:06 -0400139LOCAL_SRC_FILES := ../$(SFLPHONE_BUILD_DIR)/src/audio/codecs/libcodec_speex_ub.so
Alexandre Lision399db752014-09-03 10:27:56 -0400140include $(PREBUILT_SHARED_LIBRARY)
141
142include $(CLEAR_VARS)
143LOCAL_MODULE := speex_wb
Tristan Matthewseaaa5ba2014-10-09 04:23:06 -0400144LOCAL_SRC_FILES := ../$(SFLPHONE_BUILD_DIR)/src/audio/codecs/libcodec_speex_wb.so
Alexandre Lision399db752014-09-03 10:27:56 -0400145include $(PREBUILT_SHARED_LIBRARY)
146
147include $(CLEAR_VARS)
148LOCAL_MODULE := opus
Tristan Matthewseaaa5ba2014-10-09 04:23:06 -0400149LOCAL_SRC_FILES := ../$(SFLPHONE_BUILD_DIR)/src/audio/codecs/libcodec_opus.so
Alexandre Lision399db752014-09-03 10:27:56 -0400150include $(PREBUILT_SHARED_LIBRARY)
151
152include $(CLEAR_VARS)
153LOCAL_MODULE := gsm
Tristan Matthewseaaa5ba2014-10-09 04:23:06 -0400154LOCAL_SRC_FILES := ../$(SFLPHONE_BUILD_DIR)/src/audio/codecs/libcodec_gsm.so
Alexandre Lision399db752014-09-03 10:27:56 -0400155include $(PREBUILT_SHARED_LIBRARY)
156
157include $(CLEAR_VARS)
158LOCAL_MODULE := g729
Tristan Matthewseaaa5ba2014-10-09 04:23:06 -0400159LOCAL_SRC_FILES := ../$(SFLPHONE_BUILD_DIR)/src/audio/codecs/libcodec_g729.so
Alexandre Lision399db752014-09-03 10:27:56 -0400160include $(PREBUILT_SHARED_LIBRARY)