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