Android.mk 3.38 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
##
## 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
##  GNU Library General Public License for more details.
##
##  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
LOCAL_C_INCLUDES += \
77 78 79 80
	$(LOCAL_PATH) \
	$(LOCAL_PATH)/include \
	$(LOCAL_PATH)/../oRTP/include \
	$(LOCAL_PATH)/../mediastreamer2/include \
jehan's avatar
jehan committed
81 82
	$(LOCAL_PATH)/../../externals/exosip/include \
	$(LOCAL_PATH)/../../externals/osip/include 
83

84
LOCAL_LDLIBS += -llog -ldl
85

jehan's avatar
jehan committed
86 87


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

96

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

LOCAL_STATIC_LIBRARIES += \
	libmsamr \
	libopencoreamr 
endif

105
ifeq ($(LINPHONE_VIDEO),1)
106
LOCAL_LDLIBS    += -lGLESv2
107
LOCAL_STATIC_LIBRARIES += libvpx
108
ifeq ($(BUILD_X264),1)
109
LOCAL_STATIC_LIBRARIES += \
110
	libmsx264 \
111
	libx264
112
endif
113
LOCAL_SHARED_LIBRARIES += \
114 115 116
	libavcodec \
	libswscale \
	libavcore \
117
	libavutil
118 119
endif

120
LOCAL_STATIC_LIBRARIES += libspeex 
jehan's avatar
jehan committed
121 122


jehan's avatar
jehan committed
123
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
124 125
LOCAL_CFLAGS += -DHAVE_ILBC=1
LOCAL_STATIC_LIBRARIES += libmsilbc
jehan's avatar
jehan committed
126
endif
127

128
LOCAL_C_INCLUDES += $(LIBLINPHONE_EXTENDED_C_INCLUDES) 
129 130 131 132
LOCAL_STATIC_LIBRARIES += $(LIBLINPHONE_EXTENDED_STATIC_LIBS)
LOCAL_SRC_FILES  += $(LIBLINPHONE_EXTENDED_SRC_FILES)

LOCAL_LDLIBS    += -lGLESv2
133
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
134
	LOCAL_SHARED_LIBRARIES += liblinssl liblincrypto
135
	ifeq ($(BUILD_GPLV3_ZRTP),1)
136
	LOCAL_SHARED_LIBRARIES += libzrtpcpp
137 138 139
	endif

	ifeq ($(BUILD_SRTP),1)
140
	LOCAL_SHARED_LIBRARIES += libsrtp
141
	endif
142
else
143 144 145 146
	LOCAL_LDLIBS += -lz
	#LOCAL_STATIC_LIBRARIES += libz libdl
	LOCAL_STATIC_LIBRARIES += \
		libssl-static libcrypto-static
147 148 149 150 151 152 153
	ifeq ($(BUILD_GPLV3_ZRTP),1)
		LOCAL_STATIC_LIBRARIES += libzrtpcpp-static
	endif

	ifeq ($(BUILD_SRTP),1)
		LOCAL_STATIC_LIBRARIES += libsrtp-static
	endif
154
endif
155

Guillaume Beraudo's avatar
Guillaume Beraudo committed
156
LOCAL_MODULE := liblinphone
157 158
include $(BUILD_SHARED_LIBRARY)

159 160 161
$(call import-module,android/cpufeatures)