blob: 8710a942cede5b7084841a03a6b0b67b0d6e099f [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
38LOCAL_SRC_FILES := $(SFLPHONE_SRC)/daemon/src/.libs/libsflphone.so
39include $(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) \
Alexandre Lision9abb7c92014-08-04 19:22:55 -040066 $(SFLPHONE_SRC)/daemon \
Alexandre Lision0ac06852014-08-06 09:54:30 -040067 $(SFLPHONE_SRC)/daemon/src \
Alexandre Lision9abb7c92014-08-04 19:22:55 -040068 $(SFLPHONE_SRC)/contrib/$(TARGET_TUPLE)/include
alision3ea8f3c2013-07-16 17:35:35 -040069
Alexandre Lision9abb7c92014-08-04 19:22:55 -040070LOCAL_MODULE := libsflphonejni
alision3ea8f3c2013-07-16 17:35:35 -040071
72LOCAL_CPPFLAGS += $(NETWORKMANAGER) \
Alexandre Lisiona1ad1c32013-10-15 16:35:20 -040073 -DCCPP_PREFIX \
74 -DCODECS_DIR=\"/usr/lib/sflphone/audio/codec\" \
75 -DPREFIX=\"$(MY_PREFIX)\" \
76 -DPROGSHAREDIR=\"${MY_DATADIR}/sflphone\" \
77 -DHAVE_CONFIG_H \
Alexandre Lision62138172013-10-17 11:52:45 -040078 -DHAVE_SPEEX_CODEC \
Alexandre Lisiona1ad1c32013-10-15 16:35:20 -040079 -DHAVE_GSM_CODEC \
80 -w \
Alexandre Lision907ed2e2014-02-04 10:33:09 -050081 -std=c++11 -fexceptions -fpermissive \
Alexandre Lisiona1ad1c32013-10-15 16:35:20 -040082 -DAPP_NAME=\"sflphone\" \
83 -DSWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON \
84 -DDEBUG_DIRECTOR_OWNED \
85 -DPJ_AUTOCONF=1
alision3ea8f3c2013-07-16 17:35:35 -040086
Alexandre Lision17b60c32014-02-03 14:37:59 -050087LOCAL_LDLIBS += -lz \
88 -llog \
89 -lOpenSLES \
Alexandre Lision449ca842014-08-05 11:22:50 -040090 -L$(SFLPHONE_CONTRIB)/lib \
91 -L$(SFLPHONE_SRC)/daemon/src/.libs \
Alexandre Lision399db752014-09-03 10:27:56 -040092 $(SFLPHONE_SRC)/daemon/src/.libs/libsflphone.a \
Alexandre Lision449ca842014-08-05 11:22:50 -040093 -lexpat -lhogweed -lpj-arm-unknown-linux-androideabi \
94 -lpjsip-simple-arm-unknown-linux-androideabi \
95 -lpjlib-util-arm-unknown-linux-androideabi \
96 -lpjsip-ua-arm-unknown-linux-androideabi \
Tristan Matthews1b5d1322014-09-29 17:29:16 -040097 -lspeexdsp -lvorbisfile -lyaml-cpp \
Tristan Matthews6dab5d92014-10-08 16:42:34 -040098 -lFLAC -liax -lsrtp-arm-unknown-linux-androideabi -lgcrypt -lnettle \
Alexandre Lision449ca842014-08-05 11:22:50 -040099 -lpjmedia-arm-unknown-linux-androideabi \
Tristan Matthews6dab5d92014-10-08 16:42:34 -0400100 -lpjsua2-arm-unknown-linux-androideabi -lgmp \
Alexandre Lision449ca842014-08-05 11:22:50 -0400101 -logg -lpjmedia-audiodev-arm-unknown-linux-androideabi \
Tristan Matthews1b5d1322014-09-29 17:29:16 -0400102 -lpjsua-arm-unknown-linux-androideabi -lucommon \
Tristan Matthews6dab5d92014-10-08 16:42:34 -0400103 -lgnutls -lopus \
Alexandre Lision449ca842014-08-05 11:22:50 -0400104 -lresample-arm-unknown-linux-androideabi -lusecure \
Tristan Matthews6dab5d92014-10-08 16:42:34 -0400105 -lgnutls-xssl -lpcre \
Alexandre Lision449ca842014-08-05 11:22:50 -0400106 -lsamplerate -luuid -lccrtp -lgpg-error -lpcrecpp \
107 -lpjnath-arm-unknown-linux-androideabi -lsndfile -lvorbis \
108 -lcommoncpp -lgsm -lpcreposix -lpjsip-arm-unknown-linux-androideabi \
109 -lspeex -lvorbisenc \
110 $(CPP_STATIC)
alision3ea8f3c2013-07-16 17:35:35 -0400111
Alexandre Lision7c6f4a62013-09-05 13:27:01 -0400112include $(BUILD_SHARED_LIBRARY)
Alexandre Lision399db752014-09-03 10:27:56 -0400113
114########### Codecs ###############
115
116include $(CLEAR_VARS)
117LOCAL_MODULE := ulaw
118LOCAL_SRC_FILES := $(SFLPHONE_SRC)/daemon/src/audio/codecs/libcodec_ulaw.so
119include $(PREBUILT_SHARED_LIBRARY)
120
121include $(CLEAR_VARS)
122LOCAL_MODULE := alaw
123LOCAL_SRC_FILES := $(SFLPHONE_SRC)/daemon/src/audio/codecs/libcodec_alaw.so
124include $(PREBUILT_SHARED_LIBRARY)
125
126include $(CLEAR_VARS)
127LOCAL_MODULE := g722
128LOCAL_SRC_FILES := $(SFLPHONE_SRC)/daemon/src/audio/codecs/libcodec_g722.so
129include $(PREBUILT_SHARED_LIBRARY)
130
131include $(CLEAR_VARS)
132LOCAL_MODULE := speex_nb
133LOCAL_SRC_FILES := $(SFLPHONE_SRC)/daemon/src/audio/codecs/libcodec_speex_nb.so
134include $(PREBUILT_SHARED_LIBRARY)
135
136include $(CLEAR_VARS)
137LOCAL_MODULE := speex_ub
138LOCAL_SRC_FILES := $(SFLPHONE_SRC)/daemon/src/audio/codecs/libcodec_speex_ub.so
139include $(PREBUILT_SHARED_LIBRARY)
140
141include $(CLEAR_VARS)
142LOCAL_MODULE := speex_wb
143LOCAL_SRC_FILES := $(SFLPHONE_SRC)/daemon/src/audio/codecs/libcodec_speex_wb.so
144include $(PREBUILT_SHARED_LIBRARY)
145
146include $(CLEAR_VARS)
147LOCAL_MODULE := opus
148LOCAL_SRC_FILES := $(SFLPHONE_SRC)/daemon/src/audio/codecs/libcodec_opus.so
149include $(PREBUILT_SHARED_LIBRARY)
150
151include $(CLEAR_VARS)
152LOCAL_MODULE := gsm
153LOCAL_SRC_FILES := $(SFLPHONE_SRC)/daemon/src/audio/codecs/libcodec_gsm.so
154include $(PREBUILT_SHARED_LIBRARY)
155
156include $(CLEAR_VARS)
157LOCAL_MODULE := g729
158LOCAL_SRC_FILES := $(SFLPHONE_SRC)/daemon/src/audio/codecs/libcodec_g729.so
159include $(PREBUILT_SHARED_LIBRARY)