blob: d4a882cc403a73d280a3ede3a094e5328a03d700 [file] [log] [blame]
andrew@webrtc.orgb9d7d932012-01-25 19:21:13 +00001# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:25 +00002#
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
kma@webrtc.orgb59c0312011-12-03 18:34:50 +00009#############################
10# Build the non-neon library.
11
niklase@google.com470e71d2011-07-07 08:21:25 +000012LOCAL_PATH := $(call my-dir)
13
14include $(CLEAR_VARS)
15
andrew@webrtc.org4d5d5c12011-10-19 01:40:33 +000016include $(LOCAL_PATH)/../../../../android-webrtc.mk
leozwang@google.com79835d12011-08-05 21:01:02 +000017
niklase@google.com470e71d2011-07-07 08:21:25 +000018LOCAL_ARM_MODE := arm
19LOCAL_MODULE_CLASS := STATIC_LIBRARIES
20LOCAL_MODULE := libwebrtc_aecm
21LOCAL_MODULE_TAGS := optional
leozwang@google.com58d09cf2011-07-25 22:49:00 +000022LOCAL_SRC_FILES := \
23 echo_control_mobile.c \
leozwang@google.comce950692011-09-15 22:28:08 +000024 aecm_core.c
niklase@google.com470e71d2011-07-07 08:21:25 +000025
26# Flags passed to both C and C++ files.
kma@webrtc.orgb59c0312011-12-03 18:34:50 +000027LOCAL_CFLAGS := $(MY_WEBRTC_COMMON_DEFS)
kma@google.com1959e6f2011-08-13 06:33:38 +000028
leozwang@google.com58d09cf2011-07-25 22:49:00 +000029LOCAL_C_INCLUDES := \
andrew@webrtc.orgb9d7d932012-01-25 19:21:13 +000030 $(LOCAL_PATH)/include \
andrew@webrtc.org4d5d5c12011-10-19 01:40:33 +000031 $(LOCAL_PATH)/../utility \
32 $(LOCAL_PATH)/../../.. \
kma@webrtc.orgb59c0312011-12-03 18:34:50 +000033 $(LOCAL_PATH)/../../../common_audio/signal_processing/include \
34 $(LOCAL_PATH)/../../../system_wrappers/interface
35
36LOCAL_STATIC_LIBRARIES += libwebrtc_system_wrappers
niklase@google.com470e71d2011-07-07 08:21:25 +000037
leozwang@google.com58d09cf2011-07-25 22:49:00 +000038LOCAL_SHARED_LIBRARIES := \
39 libcutils \
niklase@google.com470e71d2011-07-07 08:21:25 +000040 libdl \
41 libstlport
niklase@google.com470e71d2011-07-07 08:21:25 +000042
leozwang@google.com58d09cf2011-07-25 22:49:00 +000043ifndef NDK_ROOT
niklase@google.com470e71d2011-07-07 08:21:25 +000044include external/stlport/libstlport.mk
leozwang@google.com58d09cf2011-07-25 22:49:00 +000045endif
niklase@google.com470e71d2011-07-07 08:21:25 +000046include $(BUILD_STATIC_LIBRARY)
kma@webrtc.orgb59c0312011-12-03 18:34:50 +000047
48#########################
49# Build the neon library.
kma@webrtc.org746f9e32012-01-04 17:47:57 +000050ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
kma@webrtc.orgb59c0312011-12-03 18:34:50 +000051
52include $(CLEAR_VARS)
53
54LOCAL_ARM_MODE := arm
55LOCAL_MODULE_CLASS := STATIC_LIBRARIES
56LOCAL_MODULE := libwebrtc_aecm_neon
57LOCAL_MODULE_TAGS := optional
58
kma@webrtc.orgf85b35a2012-06-07 16:17:17 +000059GEN := $(LOCAL_PATH)/aecm_core_neon_offsets.h
60
61# Generate a header file aecm_core_neon_offsets.h which will be included in
62# assembly file aecm_core_neon.S, from file aecm_core_neon_offsets.c.
leozwang@webrtc.org534e4952012-10-22 21:21:52 +000063$(GEN): $(LOCAL_PATH)/../../../build/generate_asm_header.py \
kma@webrtc.orgf85b35a2012-06-07 16:17:17 +000064 $(intermediates)/aecm_core_neon_offsets.S
65 @python $^ $@ offset_aecm_
66
67$(intermediates)/aecm_core_neon_offsets.S: \
68 $(LOCAL_PATH)/aecm_core_neon_offsets.c
69 @$(TARGET_CC) $(addprefix -I, $(LOCAL_INCLUDES)) $(addprefix -isystem ,\
70 $(TARGET_C_INCLUDES)) -S -o $@ $^
71
72LOCAL_GENERATED_SOURCES := $(GEN)
73LOCAL_SRC_FILES := aecm_core_neon.S
kma@webrtc.orgb59c0312011-12-03 18:34:50 +000074
75# Flags passed to both C and C++ files.
76LOCAL_CFLAGS := \
77 $(MY_WEBRTC_COMMON_DEFS) \
78 -mfpu=neon \
kma@webrtc.org746f9e32012-01-04 17:47:57 +000079 -mfloat-abi=softfp \
kma@webrtc.orgb59c0312011-12-03 18:34:50 +000080 -flax-vector-conversions
81
82LOCAL_C_INCLUDES := \
andrew@webrtc.orgb9d7d932012-01-25 19:21:13 +000083 $(LOCAL_PATH)/include \
kma@webrtc.orgb59c0312011-12-03 18:34:50 +000084 $(LOCAL_PATH)/../../.. \
85 $(LOCAL_PATH)/../../../common_audio/signal_processing/include
86
kma@webrtc.orgf85b35a2012-06-07 16:17:17 +000087LOCAL_INCLUDES := $(LOCAL_C_INCLUDES)
88
kma@webrtc.orgb59c0312011-12-03 18:34:50 +000089ifndef NDK_ROOT
90include external/stlport/libstlport.mk
91endif
92include $(BUILD_STATIC_LIBRARY)
kma@webrtc.org746f9e32012-01-04 17:47:57 +000093
94endif # ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)