| 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)/../../src |
|---|
| 23 | include $(CLEAR_VARS) |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | LOCAL_ARM_MODE := arm |
|---|
| 27 | |
|---|
| 28 | MEDIASTREAMER2_INCLUDES := \ |
|---|
| 29 | $(LOCAL_PATH)/../build/android \ |
|---|
| 30 | $(LOCAL_PATH)/../include \ |
|---|
| 31 | $(LOCAL_PATH)/../../oRTP \ |
|---|
| 32 | $(LOCAL_PATH)/../../oRTP/include \ |
|---|
| 33 | $(LOCAL_PATH)/../../../externals/speex/include \ |
|---|
| 34 | $(LOCAL_PATH)/../../../externals/build/speex \ |
|---|
| 35 | $(LOCAL_PATH)/../../../externals/gsm/inc \ |
|---|
| 36 | $(LOCAL_PATH)/../../../externals/ffmpeg \ |
|---|
| 37 | $(LOCAL_PATH)/../../../externals/ \ |
|---|
| 38 | $(LOCAL_PATH)/../../../externals/build/ffmpeg \ |
|---|
| 39 | $(LOCAL_PATH)/../../../externals/libvpx/ |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | LOCAL_MODULE := libmediastreamer2 |
|---|
| 43 | |
|---|
| 44 | LOCAL_SRC_FILES = \ |
|---|
| 45 | audiomixer.c \ |
|---|
| 46 | audioconference.c \ |
|---|
| 47 | mscommon.c \ |
|---|
| 48 | msfilter.c \ |
|---|
| 49 | msqueue.c \ |
|---|
| 50 | msticker.c \ |
|---|
| 51 | msvoip.c \ |
|---|
| 52 | alaw.c \ |
|---|
| 53 | ulaw.c \ |
|---|
| 54 | mssndcard.c \ |
|---|
| 55 | msfileplayer.c \ |
|---|
| 56 | msrtp.c \ |
|---|
| 57 | dtmfgen.c \ |
|---|
| 58 | msfilerec.c \ |
|---|
| 59 | ice.c \ |
|---|
| 60 | tee.c \ |
|---|
| 61 | msconf.c \ |
|---|
| 62 | msjoin.c \ |
|---|
| 63 | msvolume.c \ |
|---|
| 64 | mtu.c \ |
|---|
| 65 | mswebcam.c \ |
|---|
| 66 | equalizer.c \ |
|---|
| 67 | dsptools.c \ |
|---|
| 68 | kiss_fft.c \ |
|---|
| 69 | kiss_fftr.c \ |
|---|
| 70 | void.c \ |
|---|
| 71 | msandroid.cpp \ |
|---|
| 72 | eventqueue.c \ |
|---|
| 73 | msjava.c \ |
|---|
| 74 | tonedetector.c \ |
|---|
| 75 | audiostream.c \ |
|---|
| 76 | qualityindicator.c \ |
|---|
| 77 | bitratecontrol.c \ |
|---|
| 78 | bitratedriver.c \ |
|---|
| 79 | qosanalyzer.c \ |
|---|
| 80 | msg722.c \ |
|---|
| 81 | g722_decode.c \ |
|---|
| 82 | g722_encode.c \ |
|---|
| 83 | l16.c \ |
|---|
| 84 | msresample.c \ |
|---|
| 85 | android/loader.cpp \ |
|---|
| 86 | android/androidsound.cpp \ |
|---|
| 87 | android/AudioRecord.cpp \ |
|---|
| 88 | android/AudioTrack.cpp \ |
|---|
| 89 | android/AudioSystem.cpp \ |
|---|
| 90 | android/String8.cpp |
|---|
| 91 | |
|---|
| 92 | ##if BUILD_ALSA |
|---|
| 93 | ifeq ($(strip $(BOARD_USES_ALSA_AUDIO)),true) |
|---|
| 94 | LOCAL_SRC_FILES += alsa.c |
|---|
| 95 | LOCAL_CFLAGS += -D__ALSA_ENABLED__ |
|---|
| 96 | endif |
|---|
| 97 | |
|---|
| 98 | ifeq ($(BUILD_SRTP), 1) |
|---|
| 99 | LOCAL_C_INCLUDES += $(SRTP_C_INCLUDE) |
|---|
| 100 | else |
|---|
| 101 | |
|---|
| 102 | endif |
|---|
| 103 | |
|---|
| 104 | ifeq ($(LINPHONE_VIDEO),1) |
|---|
| 105 | LOCAL_SRC_FILES += \ |
|---|
| 106 | videostream.c \ |
|---|
| 107 | videoenc.c \ |
|---|
| 108 | videodec.c \ |
|---|
| 109 | pixconv.c \ |
|---|
| 110 | sizeconv.c \ |
|---|
| 111 | nowebcam.c \ |
|---|
| 112 | h264dec.c \ |
|---|
| 113 | rfc3984.c \ |
|---|
| 114 | mire.c \ |
|---|
| 115 | layouts.c \ |
|---|
| 116 | android-display.c \ |
|---|
| 117 | android-display-bad.cpp \ |
|---|
| 118 | msandroidvideo.cpp \ |
|---|
| 119 | vp8.c \ |
|---|
| 120 | shaders.c \ |
|---|
| 121 | opengles_display.c \ |
|---|
| 122 | android-opengl-display.c \ |
|---|
| 123 | jpegwriter.c |
|---|
| 124 | |
|---|
| 125 | ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) |
|---|
| 126 | LOCAL_CFLAGS += -DVIDEO_ENABLED |
|---|
| 127 | LOCAL_SRC_FILES+= \ |
|---|
| 128 | scaler.c.neon \ |
|---|
| 129 | scaler_arm.S.neon \ |
|---|
| 130 | msvideo.c \ |
|---|
| 131 | msvideo_neon.c.neon |
|---|
| 132 | else |
|---|
| 133 | LOCAL_SRC_FILES+= scaler.c \ |
|---|
| 134 | msvideo.c |
|---|
| 135 | endif |
|---|
| 136 | endif |
|---|
| 137 | |
|---|
| 138 | #LOCAL_SRC_FILES += videostream.c |
|---|
| 139 | # |
|---|
| 140 | ##if BUILD_THEORA |
|---|
| 141 | #LOCAL_SRC_FILES += theora.c |
|---|
| 142 | |
|---|
| 143 | #if BUILD_SPEEX |
|---|
| 144 | LOCAL_SRC_FILES += \ |
|---|
| 145 | msspeex.c \ |
|---|
| 146 | speexec.c |
|---|
| 147 | |
|---|
| 148 | ##if BUILD_GSM |
|---|
| 149 | LOCAL_SRC_FILES += gsm.c |
|---|
| 150 | |
|---|
| 151 | LOCAL_CFLAGS += \ |
|---|
| 152 | -UHAVE_CONFIG_H \ |
|---|
| 153 | -include $(LOCAL_PATH)/../build/android/libmediastreamer2_AndroidConfig.h \ |
|---|
| 154 | -DMS2_INTERNAL \ |
|---|
| 155 | -DMS2_FILTERS \ |
|---|
| 156 | -DINET6 \ |
|---|
| 157 | -DORTP_INET6 \ |
|---|
| 158 | -D_POSIX_SOURCE -Wall |
|---|
| 159 | |
|---|
| 160 | |
|---|
| 161 | ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) |
|---|
| 162 | LOCAL_CFLAGS += -DUSE_HARDWARE_RATE=1 |
|---|
| 163 | endif |
|---|
| 164 | |
|---|
| 165 | |
|---|
| 166 | #LOCAL_CFLAGS += -DDEBUG |
|---|
| 167 | |
|---|
| 168 | LOCAL_C_INCLUDES += \ |
|---|
| 169 | $(MEDIASTREAMER2_INCLUDES) |
|---|
| 170 | |
|---|
| 171 | LOCAL_STATIC_LIBRARIES := \ |
|---|
| 172 | libortp \ |
|---|
| 173 | libspeex \ |
|---|
| 174 | libspeexdsp |
|---|
| 175 | |
|---|
| 176 | |
|---|
| 177 | ifeq ($(strip $(BOARD_USES_ALSA_AUDIO)),true) |
|---|
| 178 | LOCAL_SHARED_LIBRARIES += libasound |
|---|
| 179 | endif |
|---|
| 180 | |
|---|
| 181 | LOCAL_STATIC_LIBRARIES += cpufeatures |
|---|
| 182 | |
|---|
| 183 | ifeq ($(BUILD_MS2), 1) |
|---|
| 184 | LOCAL_SRC_FILES += \ |
|---|
| 185 | ../tests/mediastream.c |
|---|
| 186 | |
|---|
| 187 | LOCAL_STATIC_LIBRARIES += \ |
|---|
| 188 | libgsm |
|---|
| 189 | ifeq ($(LINPHONE_VIDEO),1) |
|---|
| 190 | LOCAL_STATIC_LIBRARIES += \ |
|---|
| 191 | libgsm \ |
|---|
| 192 | libvpx \ |
|---|
| 193 | libavcodec \ |
|---|
| 194 | libswscale \ |
|---|
| 195 | libavcore \ |
|---|
| 196 | libavutil |
|---|
| 197 | endif |
|---|
| 198 | |
|---|
| 199 | ifeq ($(BUILD_SRTP),1) |
|---|
| 200 | LOCAL_SHARED_LIBRARIES += libsrtp |
|---|
| 201 | endif |
|---|
| 202 | |
|---|
| 203 | LOCAL_LDLIBS += -lGLESv2 -llog -ldl |
|---|
| 204 | include $(BUILD_SHARED_LIBRARY) |
|---|
| 205 | else |
|---|
| 206 | include $(BUILD_STATIC_LIBRARY) |
|---|
| 207 | endif |
|---|
| 208 | |
|---|
| 209 | $(call import-module,android/cpufeatures) |
|---|