]> sjero.net Git - linphone/blob - build/android/Android.mk
Merge branch 'master' of git.savannah.nongnu.org:/srv/git/linphone
[linphone] / build / android / Android.mk
1 ##
2 ## Android.mk -Android build script-
3 ##
4 ##
5 ## Copyright (C) 2010  Belledonne Communications, Grenoble, France
6 ##
7 ##  This program is free software; you can redistribute it and/or modify
8 ##  it under the terms of the GNU General Public License as published by
9 ##  the Free Software Foundation; either version 2 of the License, or
10 ##  (at your option) any later version.
11 ##
12 ##  This program is distributed in the hope that it will be useful,
13 ##  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 ##  GNU Library General Public License for more details.
16 ##
17 ##  You should have received a copy of the GNU General Public License
18 ##  along with this program; if not, write to the Free Software
19 ##  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 ##
21
22 LOCAL_PATH:= $(call my-dir)/../../coreapi
23
24
25 include $(CLEAR_VARS)
26
27 LOCAL_CPP_EXTENSION := .cc
28
29 LOCAL_SRC_FILES := \
30         linphonecore.c \
31         misc.c  \
32         enum.c \
33         presence.c \
34         proxy.c \
35         friend.c \
36         authentication.c \
37         lpconfig.c \
38         chat.c \
39         sipsetup.c \
40         siplogin.c \
41         address.c \
42         linphonecore_jni.cc \
43         sal.c \
44         sal_eXosip2.c \
45         sal_eXosip2_presence.c \
46         sal_eXosip2_sdp.c \
47         offeranswer.c \
48         callbacks.c \
49         linphonecall.c \
50         ec-calibrator.c
51
52 ifndef MY_LOG_DOMAIN
53 MY_LOG_DOMAIN = \"Linphone\"
54 endif
55
56 LOCAL_CFLAGS += \
57         -D_BYTE_ORDER=_LITTLE_ENDIAN \
58         -DORTP_INET6 \
59         -DENABLE_TRACE \
60         -DLINPHONE_VERSION=\"3.4.0\" \
61         -DLINPHONE_PLUGINS_DIR=\"\\tmp\" \
62         -DLOG_DOMAIN=$(MY_LOG_DOMAIN)
63
64 LOCAL_CFLAGS += -DIN_LINPHONE
65
66
67 ifeq ($(LINPHONE_VIDEO),1)
68 LOCAL_CFLAGS += -DVIDEO_ENABLED
69 ifeq ($(BUILD_X264),1)
70 LOCAL_CFLAGS += -DHAVE_X264
71 endif
72 endif
73 LOCAL_C_INCLUDES += \
74         $(LOCAL_PATH) \
75         $(LOCAL_PATH)/include \
76         $(LOCAL_PATH)/../oRTP/include \
77         $(LOCAL_PATH)/../mediastreamer2/include \
78         $(LOCAL_PATH)/../../externals/exosip/include \
79         $(LOCAL_PATH)/../../externals/osip/include 
80
81 LOCAL_LDLIBS += -llog -ldl
82
83
84
85 LOCAL_STATIC_LIBRARIES := \
86         libmediastreamer2 \
87         libortp \
88         libeXosip2 \
89         libosip2 \
90         libgsm
91
92
93 ifeq ($(LINPHONE_VIDEO),1)
94 ifeq ($(BUILD_X264),1)
95 LOCAL_STATIC_LIBRARIES += \
96         libmsx264 \
97         libx264 
98 endif
99 LOCAL_SHARED_LIBRARIES += \
100         libavcodec \
101         libswscale \
102         libavcore \
103         libavutil
104 endif
105
106 LOCAL_STATIC_LIBRARIES += libspeex 
107
108
109 ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
110 LOCAL_CFLAGS += -DHAVE_ILBC=1
111 LOCAL_STATIC_LIBRARIES += libmsilbc
112 else
113 LOCAL_STATIC_LIBRARIES += $(LIBLINPHONE_EXTENDED_STATIC_LIBS)
114 LOCAL_SRC_FILES  += $(LIBLINPHONE_EXTENDED_SRC_FILES)
115 LOCAL_C_INCLUDES += $(LIBLINPHONE_EXTENDED_C_INCLUDES) \
116 endif
117
118
119 LOCAL_MODULE := liblinphone
120 include $(BUILD_SHARED_LIBRARY)
121