Android.mk 3.52 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
##
## Android.mk -Android build script-
##
##
## Copyright (C) 2010  Belledonne Communications, Grenoble, France
##
##  This program is free software; you can redistribute it and/or modify
##  it under the terms of the GNU General Public License as published by
##  the Free Software Foundation; either version 2 of the License, or
##  (at your option) any later version.
##
##  This program is distributed in the hope that it will be useful,
##  but WITHOUT ANY WARRANTY; without even the implied warranty of
##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Simon Morlat's avatar
Simon Morlat committed
15
##  GNU General Public License for more details.
16 17 18 19 20 21 22 23 24
##
##  You should have received a copy of the GNU General Public License
##  along with this program; if not, write to the Free Software
##  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##

LOCAL_PATH:= $(call my-dir)/../../coreapi


25
include $(CLEAR_VARS)
26

27
LOCAL_CPP_EXTENSION := .cc
Guillaume Beraudo's avatar
Guillaume Beraudo committed
28

29
LOCAL_SRC_FILES := \
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
	linphonecore.c \
	misc.c  \
	enum.c \
	presence.c \
	proxy.c \
	friend.c \
	authentication.c \
	lpconfig.c \
	chat.c \
	sipsetup.c \
	siplogin.c \
	address.c \
	linphonecore_jni.cc \
	sal.c \
	sal_eXosip2.c \
	sal_eXosip2_presence.c \
	sal_eXosip2_sdp.c \
	offeranswer.c \
jehan's avatar
jehan committed
48
	callbacks.c \
jehan's avatar
jehan committed
49
	linphonecall.c \
50
	conference.c \
jehan's avatar
jehan committed
51
	ec-calibrator.c
52

53 54 55 56 57
ifndef MY_LOG_DOMAIN
MY_LOG_DOMAIN = \"Linphone\"
endif

LOCAL_CFLAGS += \
58 59
	-D_BYTE_ORDER=_LITTLE_ENDIAN \
	-DORTP_INET6 \
60 61
        -DINET6 \
        -DOSIP_MT \
62
	-DENABLE_TRACE \
Simon Morlat's avatar
Simon Morlat committed
63
	-DLINPHONE_VERSION=\"3.4.0\" \
64
	-DLINPHONE_PLUGINS_DIR=\"\\tmp\" \
65
	-DLOG_DOMAIN=$(MY_LOG_DOMAIN) 
66

67
LOCAL_CFLAGS += -DIN_LINPHONE
68

69

70 71
ifeq ($(LINPHONE_VIDEO),1)
LOCAL_CFLAGS += -DVIDEO_ENABLED
72 73 74
ifeq ($(BUILD_X264),1)
LOCAL_CFLAGS += -DHAVE_X264
endif
75
endif
76

77
LOCAL_C_INCLUDES += \
78 79 80 81
	$(LOCAL_PATH) \
	$(LOCAL_PATH)/include \
	$(LOCAL_PATH)/../oRTP/include \
	$(LOCAL_PATH)/../mediastreamer2/include \
jehan's avatar
jehan committed
82 83
	$(LOCAL_PATH)/../../externals/exosip/include \
	$(LOCAL_PATH)/../../externals/osip/include 
84

85
LOCAL_LDLIBS += -llog -ldl
86

jehan's avatar
jehan committed
87 88


89
LOCAL_STATIC_LIBRARIES := \
90
	cpufeatures \
91 92 93 94
	libmediastreamer2 \
	libortp \
	libeXosip2 \
	libosip2 \
Simon Morlat's avatar
Simon Morlat committed
95
	libgsm 
96

97

Simon Morlat's avatar
Simon Morlat committed
98 99 100 101 102 103 104 105
ifneq ($(BUILD_AMR),0)
LOCAL_CFLAGS += -DHAVE_AMR

LOCAL_STATIC_LIBRARIES += \
	libmsamr \
	libopencoreamr 
endif

106 107 108 109 110
ifeq ($(BUILD_SILK),1)
LOCAL_CFLAGS += -DHAVE_SILK
LOCAL_STATIC_LIBRARIES += libmssilk
endif

111
ifeq ($(LINPHONE_VIDEO),1)
112
LOCAL_LDLIBS    += -lGLESv2
113
LOCAL_STATIC_LIBRARIES += libvpx
114
ifeq ($(BUILD_X264),1)
115
LOCAL_STATIC_LIBRARIES += \
116
	libmsx264 \
117
	libx264
118
endif
119
LOCAL_SHARED_LIBRARIES += \
120 121 122
	libavcodec \
	libswscale \
	libavcore \
123
	libavutil
124 125
endif

126
LOCAL_STATIC_LIBRARIES += libspeex 
jehan's avatar
jehan committed
127

Guillaume Beraudo's avatar
Guillaume Beraudo committed
128 129 130
ifeq ($(BUILD_SRTP), 1)
	LOCAL_C_INCLUDES += $(SRTP_C_INCLUDE)
endif
jehan's avatar
jehan committed
131

jehan's avatar
jehan committed
132
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
133 134
LOCAL_CFLAGS += -DHAVE_ILBC=1
LOCAL_STATIC_LIBRARIES += libmsilbc
jehan's avatar
jehan committed
135
endif
136

137
LOCAL_C_INCLUDES += $(LIBLINPHONE_EXTENDED_C_INCLUDES) 
Simon Morlat's avatar
Simon Morlat committed
138
LOCAL_WHOLE_STATIC_LIBRARIES += $(LIBLINPHONE_EXTENDED_STATIC_LIBS)
139 140
LOCAL_SRC_FILES  += $(LIBLINPHONE_EXTENDED_SRC_FILES)

141
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
142
	LOCAL_SHARED_LIBRARIES += liblinssl liblincrypto
143
	ifeq ($(BUILD_GPLV3_ZRTP),1)
144
	LOCAL_SHARED_LIBRARIES += libzrtpcpp
145 146 147
	endif

	ifeq ($(BUILD_SRTP),1)
148
	LOCAL_SHARED_LIBRARIES += libsrtp
149
	endif
150
else
151 152 153 154
	LOCAL_LDLIBS += -lz
	#LOCAL_STATIC_LIBRARIES += libz libdl
	LOCAL_STATIC_LIBRARIES += \
		libssl-static libcrypto-static
155 156 157 158 159 160 161
	ifeq ($(BUILD_GPLV3_ZRTP),1)
		LOCAL_STATIC_LIBRARIES += libzrtpcpp-static
	endif

	ifeq ($(BUILD_SRTP),1)
		LOCAL_STATIC_LIBRARIES += libsrtp-static
	endif
162
endif
163

Guillaume Beraudo's avatar
Guillaume Beraudo committed
164
LOCAL_MODULE := liblinphone
165 166
include $(BUILD_SHARED_LIBRARY)

167 168 169
$(call import-module,android/cpufeatures)