- update source.
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / modules / audio_processing / aecm / Android.mk
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
12 LOCAL_PATH := $(call my-dir)
13
14 include $(CLEAR_VARS)
15
16 include $(LOCAL_PATH)/../../../../android-webrtc.mk
17
18 LOCAL_ARM_MODE := arm
19 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
20 LOCAL_MODULE := libwebrtc_aecm
21 LOCAL_MODULE_TAGS := optional
22 LOCAL_SRC_FILES := \
23     echo_control_mobile.c \
24     aecm_core.c
25
26 # Flags passed to both C and C++ files.
27 LOCAL_CFLAGS := $(MY_WEBRTC_COMMON_DEFS)
28
29 LOCAL_C_INCLUDES := \
30     $(LOCAL_PATH)/include \
31     $(LOCAL_PATH)/../utility \
32     $(LOCAL_PATH)/../../.. \
33     $(LOCAL_PATH)/../../../common_audio/signal_processing/include \
34     $(LOCAL_PATH)/../../../system_wrappers/interface \
35     external/webrtc
36
37 LOCAL_STATIC_LIBRARIES += libwebrtc_system_wrappers
38
39 LOCAL_SHARED_LIBRARIES := \
40     libcutils \
41     libdl \
42     libstlport
43
44 ifndef NDK_ROOT
45 include external/stlport/libstlport.mk
46 endif
47 include $(BUILD_STATIC_LIBRARY)
48
49 #########################
50 # Build the neon library.
51 ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
52
53 include $(CLEAR_VARS)
54
55 LOCAL_ARM_MODE := arm
56 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
57 LOCAL_MODULE := libwebrtc_aecm_neon
58 LOCAL_MODULE_TAGS := optional
59
60 AECM_ASM_HEADER := $(intermediates)/aecm_core_neon_offsets.h
61 AECM_ASM_HEADER_DIR := $(intermediates)
62
63 # Generate a header file aecm_core_neon_offsets.h which will be included in
64 # assembly file aecm_core_neon.S, from file aecm_core_neon_offsets.c.
65 $(AECM_ASM_HEADER): $(LOCAL_PATH)/../../../build/generate_asm_header.py \
66             $(LOCAL_PATH)/aecm_core_neon_offsets.c
67         @python $^ --compiler=$(TARGET_CC) --options="$(addprefix -I, \
68                 $(LOCAL_INCLUDES)) $(addprefix -isystem , $(TARGET_C_INCLUDES)) -S" \
69                 --dir=$(AECM_ASM_HEADER_DIR)
70
71 LOCAL_GENERATED_SOURCES := $(AECM_ASM_HEADER)
72 LOCAL_SRC_FILES := aecm_core_neon.S
73
74 # Flags passed to both C and C++ files.
75 LOCAL_CFLAGS := \
76     $(MY_WEBRTC_COMMON_DEFS) \
77     -mfpu=neon \
78     -mfloat-abi=softfp \
79     -flax-vector-conversions
80
81 LOCAL_C_INCLUDES := \
82     $(AECM_ASM_HEADER_DIR) \
83     $(LOCAL_PATH)/include \
84     $(LOCAL_PATH)/../../.. \
85     $(LOCAL_PATH)/../../../common_audio/signal_processing/include \
86     external/webrtc
87
88 LOCAL_INCLUDES := $(LOCAL_C_INCLUDES)
89
90 ifndef NDK_ROOT
91 include external/stlport/libstlport.mk
92 endif
93 include $(BUILD_STATIC_LIBRARY)
94
95 endif # ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)