andrew@webrtc.org | b9d7d93 | 2012-01-25 19:21:13 +0000 | [diff] [blame] | 1 | # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 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 | |
kma@webrtc.org | b59c031 | 2011-12-03 18:34:50 +0000 | [diff] [blame] | 9 | ############################# |
| 10 | # Build the non-neon library. |
| 11 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 12 | LOCAL_PATH := $(call my-dir) |
| 13 | |
| 14 | include $(CLEAR_VARS) |
| 15 | |
andrew@webrtc.org | 4d5d5c1 | 2011-10-19 01:40:33 +0000 | [diff] [blame] | 16 | include $(LOCAL_PATH)/../../../../android-webrtc.mk |
leozwang@google.com | 79835d1 | 2011-08-05 21:01:02 +0000 | [diff] [blame] | 17 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 18 | LOCAL_ARM_MODE := arm |
| 19 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 20 | LOCAL_MODULE := libwebrtc_aecm |
| 21 | LOCAL_MODULE_TAGS := optional |
leozwang@google.com | 58d09cf | 2011-07-25 22:49:00 +0000 | [diff] [blame] | 22 | LOCAL_SRC_FILES := \ |
| 23 | echo_control_mobile.c \ |
leozwang@google.com | ce95069 | 2011-09-15 22:28:08 +0000 | [diff] [blame] | 24 | aecm_core.c |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 25 | |
| 26 | # Flags passed to both C and C++ files. |
kma@webrtc.org | b59c031 | 2011-12-03 18:34:50 +0000 | [diff] [blame] | 27 | LOCAL_CFLAGS := $(MY_WEBRTC_COMMON_DEFS) |
kma@google.com | 1959e6f | 2011-08-13 06:33:38 +0000 | [diff] [blame] | 28 | |
leozwang@google.com | 58d09cf | 2011-07-25 22:49:00 +0000 | [diff] [blame] | 29 | LOCAL_C_INCLUDES := \ |
andrew@webrtc.org | b9d7d93 | 2012-01-25 19:21:13 +0000 | [diff] [blame] | 30 | $(LOCAL_PATH)/include \ |
andrew@webrtc.org | 4d5d5c1 | 2011-10-19 01:40:33 +0000 | [diff] [blame] | 31 | $(LOCAL_PATH)/../utility \ |
| 32 | $(LOCAL_PATH)/../../.. \ |
kma@webrtc.org | b59c031 | 2011-12-03 18:34:50 +0000 | [diff] [blame] | 33 | $(LOCAL_PATH)/../../../common_audio/signal_processing/include \ |
leozwang@webrtc.org | f3adba4 | 2012-11-15 18:17:40 +0000 | [diff] [blame] | 34 | $(LOCAL_PATH)/../../../system_wrappers/interface \ |
| 35 | external/webrtc |
kma@webrtc.org | b59c031 | 2011-12-03 18:34:50 +0000 | [diff] [blame] | 36 | |
| 37 | LOCAL_STATIC_LIBRARIES += libwebrtc_system_wrappers |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 38 | |
leozwang@google.com | 58d09cf | 2011-07-25 22:49:00 +0000 | [diff] [blame] | 39 | LOCAL_SHARED_LIBRARIES := \ |
| 40 | libcutils \ |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 41 | libdl \ |
| 42 | libstlport |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 43 | |
leozwang@google.com | 58d09cf | 2011-07-25 22:49:00 +0000 | [diff] [blame] | 44 | ifndef NDK_ROOT |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 45 | include external/stlport/libstlport.mk |
leozwang@google.com | 58d09cf | 2011-07-25 22:49:00 +0000 | [diff] [blame] | 46 | endif |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 47 | include $(BUILD_STATIC_LIBRARY) |
kma@webrtc.org | b59c031 | 2011-12-03 18:34:50 +0000 | [diff] [blame] | 48 | |
| 49 | ######################### |
| 50 | # Build the neon library. |
kma@webrtc.org | 746f9e3 | 2012-01-04 17:47:57 +0000 | [diff] [blame] | 51 | ifeq ($(WEBRTC_BUILD_NEON_LIBS),true) |
kma@webrtc.org | b59c031 | 2011-12-03 18:34:50 +0000 | [diff] [blame] | 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 | |
kma@webrtc.org | 1245402 | 2012-11-07 22:34:31 +0000 | [diff] [blame] | 60 | AECM_ASM_HEADER := $(intermediates)/aecm_core_neon_offsets.h |
| 61 | AECM_ASM_HEADER_DIR := $(intermediates) |
kma@webrtc.org | f85b35a | 2012-06-07 16:17:17 +0000 | [diff] [blame] | 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. |
kma@webrtc.org | 1245402 | 2012-11-07 22:34:31 +0000 | [diff] [blame] | 65 | $(AECM_ASM_HEADER): $(LOCAL_PATH)/../../../build/generate_asm_header.py \ |
kma@webrtc.org | f85b35a | 2012-06-07 16:17:17 +0000 | [diff] [blame] | 66 | $(LOCAL_PATH)/aecm_core_neon_offsets.c |
kma@webrtc.org | 1245402 | 2012-11-07 22:34:31 +0000 | [diff] [blame] | 67 | @python $^ --compiler=$(TARGET_CC) --options="$(addprefix -I, \ |
| 68 | $(LOCAL_INCLUDES)) $(addprefix -isystem , $(TARGET_C_INCLUDES)) -S" \ |
| 69 | --dir=$(AECM_ASM_HEADER_DIR) |
kma@webrtc.org | f85b35a | 2012-06-07 16:17:17 +0000 | [diff] [blame] | 70 | |
kma@webrtc.org | 1245402 | 2012-11-07 22:34:31 +0000 | [diff] [blame] | 71 | LOCAL_GENERATED_SOURCES := $(AECM_ASM_HEADER) |
kma@webrtc.org | f85b35a | 2012-06-07 16:17:17 +0000 | [diff] [blame] | 72 | LOCAL_SRC_FILES := aecm_core_neon.S |
kma@webrtc.org | b59c031 | 2011-12-03 18:34:50 +0000 | [diff] [blame] | 73 | |
| 74 | # Flags passed to both C and C++ files. |
| 75 | LOCAL_CFLAGS := \ |
| 76 | $(MY_WEBRTC_COMMON_DEFS) \ |
| 77 | -mfpu=neon \ |
kma@webrtc.org | 746f9e3 | 2012-01-04 17:47:57 +0000 | [diff] [blame] | 78 | -mfloat-abi=softfp \ |
kma@webrtc.org | b59c031 | 2011-12-03 18:34:50 +0000 | [diff] [blame] | 79 | -flax-vector-conversions |
| 80 | |
| 81 | LOCAL_C_INCLUDES := \ |
kma@webrtc.org | 1245402 | 2012-11-07 22:34:31 +0000 | [diff] [blame] | 82 | $(AECM_ASM_HEADER_DIR) \ |
andrew@webrtc.org | b9d7d93 | 2012-01-25 19:21:13 +0000 | [diff] [blame] | 83 | $(LOCAL_PATH)/include \ |
kma@webrtc.org | b59c031 | 2011-12-03 18:34:50 +0000 | [diff] [blame] | 84 | $(LOCAL_PATH)/../../.. \ |
leozwang@webrtc.org | f3adba4 | 2012-11-15 18:17:40 +0000 | [diff] [blame] | 85 | $(LOCAL_PATH)/../../../common_audio/signal_processing/include \ |
| 86 | external/webrtc |
kma@webrtc.org | b59c031 | 2011-12-03 18:34:50 +0000 | [diff] [blame] | 87 | |
kma@webrtc.org | f85b35a | 2012-06-07 16:17:17 +0000 | [diff] [blame] | 88 | LOCAL_INCLUDES := $(LOCAL_C_INCLUDES) |
| 89 | |
kma@webrtc.org | b59c031 | 2011-12-03 18:34:50 +0000 | [diff] [blame] | 90 | ifndef NDK_ROOT |
| 91 | include external/stlport/libstlport.mk |
| 92 | endif |
| 93 | include $(BUILD_STATIC_LIBRARY) |
kma@webrtc.org | 746f9e3 | 2012-01-04 17:47:57 +0000 | [diff] [blame] | 94 | |
| 95 | endif # ifeq ($(WEBRTC_BUILD_NEON_LIBS),true) |