Android.mk revision 62f88b75e4f2cf47433a0a8948d679c0334f2204
1# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS.  All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
9#############################
10# Build the non-neon library.
11
12LOCAL_PATH := $(call my-dir)
13
14include $(CLEAR_VARS)
15
16include $(LOCAL_PATH)/../../../../../../../android-webrtc.mk
17
18LOCAL_ARM_MODE := arm
19LOCAL_MODULE_CLASS := STATIC_LIBRARIES
20LOCAL_MODULE := libwebrtc_isacfix
21LOCAL_MODULE_TAGS := optional
22LOCAL_SRC_FILES := \
23    arith_routines.c \
24    arith_routines_hist.c \
25    arith_routines_logist.c \
26    bandwidth_estimator.c \
27    decode.c \
28    decode_bwe.c \
29    decode_plc.c \
30    encode.c \
31    entropy_coding.c \
32    fft.c \
33    filterbank_tables.c \
34    filterbanks.c \
35    filters.c \
36    initialize.c \
37    isacfix.c \
38    lattice.c \
39    lpc_masking_model.c \
40    lpc_tables.c \
41    pitch_estimator.c \
42    pitch_filter.c \
43    pitch_gain_tables.c \
44    pitch_lag_tables.c \
45    spectrum_ar_model_tables.c \
46    transform.c
47
48ifeq ($(ARCH_ARM_HAVE_ARMV7A),true)
49# Using .S (instead of .s) extention is to include a C header file in assembly.
50LOCAL_SRC_FILES += \
51    lattice_armv7.S \
52    pitch_filter_armv6.S
53else
54LOCAL_SRC_FILES += \
55    lattice_c.c \
56    pitch_filter_c.c
57endif
58
59# Flags passed to both C and C++ files.
60LOCAL_CFLAGS := \
61    $(MY_WEBRTC_COMMON_DEFS)
62
63LOCAL_C_INCLUDES := \
64    $(LOCAL_PATH)/../interface \
65    $(LOCAL_PATH)/../../../../../.. \
66    $(LOCAL_PATH)/../../../../../../common_audio/signal_processing/include
67
68LOCAL_STATIC_LIBRARIES += libwebrtc_system_wrappers
69
70LOCAL_SHARED_LIBRARIES := \
71    libcutils \
72    libdl
73
74ifndef NDK_ROOT
75ifndef WEBRTC_STL
76LOCAL_SHARED_LIBRARIES += libstlport
77include external/stlport/libstlport.mk
78else
79LOCAL_NDK_STL_VARIANT := $(WEBRTC_STL)
80LOCAL_SDK_VERSION := 14
81LOCAL_MODULE := $(LOCAL_MODULE)_$(WEBRTC_STL)
82endif
83else
84LOCAL_SHARED_LIBRARIES += libstlport
85endif
86
87include $(BUILD_STATIC_LIBRARY)
88
89#########################
90# Build the neon library.
91ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
92
93include $(CLEAR_VARS)
94
95LOCAL_ARM_MODE := arm
96LOCAL_MODULE_CLASS := STATIC_LIBRARIES
97LOCAL_MODULE := libwebrtc_isacfix_neon
98LOCAL_MODULE_TAGS := optional
99LOCAL_SRC_FILES := \
100    filters_neon.c \
101    lattice_neon.S \
102    lpc_masking_model_neon.S
103
104# Flags passed to both C and C++ files.
105LOCAL_CFLAGS := \
106    $(MY_WEBRTC_COMMON_DEFS) \
107    -mfpu=neon \
108    -mfloat-abi=softfp \
109    -flax-vector-conversions
110
111LOCAL_C_INCLUDES := \
112    $(LOCAL_PATH)/../interface \
113    $(LOCAL_PATH)/../../../../../.. \
114    $(LOCAL_PATH)/../../../../../../common_audio/signal_processing/include
115
116ifndef NDK_ROOT
117ifndef WEBRTC_STL
118LOCAL_SHARED_LIBRARIES += libstlport
119include external/stlport/libstlport.mk
120else
121LOCAL_NDK_STL_VARIANT := $(WEBRTC_STL)
122LOCAL_SDK_VERSION := 14
123LOCAL_MODULE := $(LOCAL_MODULE)_$(WEBRTC_STL)
124endif
125else
126LOCAL_SHARED_LIBRARIES += libstlport
127endif
128
129include $(BUILD_STATIC_LIBRARY)
130
131endif # ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
132
133###########################
134# isac test app
135
136include $(CLEAR_VARS)
137
138LOCAL_MODULE_TAGS := tests
139LOCAL_CPP_EXTENSION := .cc
140LOCAL_SRC_FILES:= ../test/kenny.c
141
142# Flags passed to both C and C++ files.
143LOCAL_CFLAGS := $(MY_WEBRTC_COMMON_DEFS)
144
145LOCAL_C_INCLUDES := \
146    $(LOCAL_PATH)/../interface \
147    $(LOCAL_PATH)/../../../../../..
148
149LOCAL_STATIC_LIBRARIES := \
150    libwebrtc_isacfix \
151    libwebrtc_spl \
152    libwebrtc_system_wrappers
153
154ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
155LOCAL_STATIC_LIBRARIES += \
156    libwebrtc_isacfix_neon
157endif
158
159LOCAL_SHARED_LIBRARIES := \
160    libutils
161
162LOCAL_MODULE:= webrtc_isac_test
163
164ifdef NDK_ROOT
165include $(BUILD_EXECUTABLE)
166else
167ifndef WEBRTC_STL
168LOCAL_SHARED_LIBRARIES += libstlport
169include external/stlport/libstlport.mk
170else
171LOCAL_NDK_STL_VARIANT := $(WEBRTC_STL)
172LOCAL_SDK_VERSION := 14
173LOCAL_MODULE := $(LOCAL_MODULE)_$(WEBRTC_STL)
174endif
175include $(BUILD_NATIVE_TEST)
176endif
177