blob: fc11383a832d37bd036370aa3ecbcf3699bdb920 [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 \
leozwang@webrtc.orgf3adba42012-11-15 18:17:40 +000034 $(LOCAL_PATH)/../../../system_wrappers/interface \
35 external/webrtc
kma@webrtc.orgb59c0312011-12-03 18:34:50 +000036
37LOCAL_STATIC_LIBRARIES += libwebrtc_system_wrappers
niklase@google.com470e71d2011-07-07 08:21:25 +000038
leozwang@google.com58d09cf2011-07-25 22:49:00 +000039LOCAL_SHARED_LIBRARIES := \
40 libcutils \
niklase@google.com470e71d2011-07-07 08:21:25 +000041 libdl \
42 libstlport
niklase@google.com470e71d2011-07-07 08:21:25 +000043
leozwang@google.com58d09cf2011-07-25 22:49:00 +000044ifndef NDK_ROOT
niklase@google.com470e71d2011-07-07 08:21:25 +000045include external/stlport/libstlport.mk
leozwang@google.com58d09cf2011-07-25 22:49:00 +000046endif
niklase@google.com470e71d2011-07-07 08:21:25 +000047include $(BUILD_STATIC_LIBRARY)
kma@webrtc.orgb59c0312011-12-03 18:34:50 +000048
49#########################
50# Build the neon library.
kma@webrtc.org746f9e32012-01-04 17:47:57 +000051ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
kma@webrtc.orgb59c0312011-12-03 18:34:50 +000052
53include $(CLEAR_VARS)
54
55LOCAL_ARM_MODE := arm
56LOCAL_MODULE_CLASS := STATIC_LIBRARIES
57LOCAL_MODULE := libwebrtc_aecm_neon
58LOCAL_MODULE_TAGS := optional
59
kma@webrtc.org12454022012-11-07 22:34:31 +000060AECM_ASM_HEADER := $(intermediates)/aecm_core_neon_offsets.h
61AECM_ASM_HEADER_DIR := $(intermediates)
kma@webrtc.orgf85b35a2012-06-07 16:17:17 +000062
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.
kma@webrtc.org12454022012-11-07 22:34:31 +000065$(AECM_ASM_HEADER): $(LOCAL_PATH)/../../../build/generate_asm_header.py \
kma@webrtc.orgf85b35a2012-06-07 16:17:17 +000066 $(LOCAL_PATH)/aecm_core_neon_offsets.c
kma@webrtc.org12454022012-11-07 22:34:31 +000067 @python $^ --compiler=$(TARGET_CC) --options="$(addprefix -I, \
68 $(LOCAL_INCLUDES)) $(addprefix -isystem , $(TARGET_C_INCLUDES)) -S" \
69 --dir=$(AECM_ASM_HEADER_DIR)
kma@webrtc.orgf85b35a2012-06-07 16:17:17 +000070
kma@webrtc.org12454022012-11-07 22:34:31 +000071LOCAL_GENERATED_SOURCES := $(AECM_ASM_HEADER)
kma@webrtc.orgf85b35a2012-06-07 16:17:17 +000072LOCAL_SRC_FILES := aecm_core_neon.S
kma@webrtc.orgb59c0312011-12-03 18:34:50 +000073
74# Flags passed to both C and C++ files.
75LOCAL_CFLAGS := \
76 $(MY_WEBRTC_COMMON_DEFS) \
77 -mfpu=neon \
kma@webrtc.org746f9e32012-01-04 17:47:57 +000078 -mfloat-abi=softfp \
kma@webrtc.orgb59c0312011-12-03 18:34:50 +000079 -flax-vector-conversions
80
81LOCAL_C_INCLUDES := \
kma@webrtc.org12454022012-11-07 22:34:31 +000082 $(AECM_ASM_HEADER_DIR) \
andrew@webrtc.orgb9d7d932012-01-25 19:21:13 +000083 $(LOCAL_PATH)/include \
kma@webrtc.orgb59c0312011-12-03 18:34:50 +000084 $(LOCAL_PATH)/../../.. \
leozwang@webrtc.orgf3adba42012-11-15 18:17:40 +000085 $(LOCAL_PATH)/../../../common_audio/signal_processing/include \
86 external/webrtc
kma@webrtc.orgb59c0312011-12-03 18:34:50 +000087
kma@webrtc.orgf85b35a2012-06-07 16:17:17 +000088LOCAL_INCLUDES := $(LOCAL_C_INCLUDES)
89
kma@webrtc.orgb59c0312011-12-03 18:34:50 +000090ifndef NDK_ROOT
91include external/stlport/libstlport.mk
92endif
93include $(BUILD_STATIC_LIBRARY)
kma@webrtc.org746f9e32012-01-04 17:47:57 +000094
95endif # ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)