Alexander Gutkin | a645182 | 2012-09-17 08:53:18 +0100 | [diff] [blame] | 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_isacfix |
| 21 | LOCAL_MODULE_TAGS := optional |
| 22 | LOCAL_SRC_FILES := \ |
| 23 | arith_routines.c \ |
| 24 | arith_routines_hist.c \ |
| 25 | arith_routines_logist.c \ |
| 26 | bandwidth_estimator.c \ |
| 27 | decode.c \ |
| 28 | decode_bwe.c \ |
| 29 | decode_plc.c \ |
| 30 | encode.c \ |
| 31 | entropy_coding.c \ |
| 32 | fft.c \ |
| 33 | filterbank_tables.c \ |
| 34 | filterbanks.c \ |
| 35 | filters.c \ |
| 36 | initialize.c \ |
| 37 | isacfix.c \ |
| 38 | lattice.c \ |
| 39 | lpc_masking_model.c \ |
| 40 | lpc_tables.c \ |
| 41 | pitch_estimator.c \ |
| 42 | pitch_filter.c \ |
| 43 | pitch_gain_tables.c \ |
| 44 | pitch_lag_tables.c \ |
| 45 | spectrum_ar_model_tables.c \ |
| 46 | transform.c |
| 47 | |
| 48 | ifeq ($(ARCH_ARM_HAVE_ARMV7A),true) |
| 49 | # Using .S (instead of .s) extention is to include a C header file in assembly. |
| 50 | LOCAL_SRC_FILES += \ |
| 51 | lattice_armv7.S \ |
| 52 | pitch_filter_armv6.S |
| 53 | else |
| 54 | LOCAL_SRC_FILES += \ |
Alexander Gutkin | 69857ee | 2012-09-20 11:57:35 +0100 | [diff] [blame^] | 55 | lattice_c.c \ |
| 56 | pitch_filter_c.c |
Alexander Gutkin | a645182 | 2012-09-17 08:53:18 +0100 | [diff] [blame] | 57 | endif |
| 58 | |
| 59 | # Flags passed to both C and C++ files. |
| 60 | LOCAL_CFLAGS := \ |
| 61 | $(MY_WEBRTC_COMMON_DEFS) |
| 62 | |
| 63 | LOCAL_C_INCLUDES := \ |
| 64 | $(LOCAL_PATH)/../interface \ |
| 65 | $(LOCAL_PATH)/../../../../../.. \ |
| 66 | $(LOCAL_PATH)/../../../../../../common_audio/signal_processing/include |
| 67 | |
| 68 | LOCAL_STATIC_LIBRARIES += libwebrtc_system_wrappers |
| 69 | |
| 70 | LOCAL_SHARED_LIBRARIES := \ |
| 71 | libcutils \ |
| 72 | libdl \ |
| 73 | libstlport |
| 74 | |
| 75 | ifndef NDK_ROOT |
| 76 | include external/stlport/libstlport.mk |
| 77 | endif |
| 78 | include $(BUILD_STATIC_LIBRARY) |
| 79 | |
| 80 | ######################### |
| 81 | # Build the neon library. |
| 82 | ifeq ($(WEBRTC_BUILD_NEON_LIBS),true) |
| 83 | |
| 84 | include $(CLEAR_VARS) |
| 85 | |
| 86 | LOCAL_ARM_MODE := arm |
| 87 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 88 | LOCAL_MODULE := libwebrtc_isacfix_neon |
| 89 | LOCAL_MODULE_TAGS := optional |
| 90 | LOCAL_SRC_FILES := \ |
| 91 | filters_neon.c \ |
| 92 | lattice_neon.S \ |
| 93 | lpc_masking_model_neon.S |
| 94 | |
| 95 | # Flags passed to both C and C++ files. |
| 96 | LOCAL_CFLAGS := \ |
| 97 | $(MY_WEBRTC_COMMON_DEFS) \ |
| 98 | -mfpu=neon \ |
| 99 | -mfloat-abi=softfp \ |
| 100 | -flax-vector-conversions |
| 101 | |
| 102 | LOCAL_C_INCLUDES := \ |
| 103 | $(LOCAL_PATH)/../interface \ |
| 104 | $(LOCAL_PATH)/../../../../../.. \ |
| 105 | $(LOCAL_PATH)/../../../../../../common_audio/signal_processing/include |
| 106 | |
| 107 | |
| 108 | ifndef NDK_ROOT |
| 109 | include external/stlport/libstlport.mk |
| 110 | endif |
| 111 | include $(BUILD_STATIC_LIBRARY) |
| 112 | |
| 113 | endif # ifeq ($(WEBRTC_BUILD_NEON_LIBS),true) |
| 114 | |
| 115 | ########################### |
| 116 | # isac test app |
| 117 | |
| 118 | include $(CLEAR_VARS) |
| 119 | |
| 120 | LOCAL_MODULE_TAGS := tests |
| 121 | LOCAL_CPP_EXTENSION := .cc |
| 122 | LOCAL_SRC_FILES:= ../test/kenny.c |
| 123 | |
| 124 | # Flags passed to both C and C++ files. |
| 125 | LOCAL_CFLAGS := $(MY_WEBRTC_COMMON_DEFS) |
| 126 | |
| 127 | LOCAL_C_INCLUDES := \ |
| 128 | $(LOCAL_PATH)/../interface \ |
| 129 | $(LOCAL_PATH)/../../../../../.. |
| 130 | |
| 131 | LOCAL_STATIC_LIBRARIES := \ |
| 132 | libwebrtc_isacfix \ |
| 133 | libwebrtc_spl \ |
| 134 | libwebrtc_system_wrappers |
| 135 | |
| 136 | ifeq ($(WEBRTC_BUILD_NEON_LIBS),true) |
| 137 | LOCAL_STATIC_LIBRARIES += \ |
| 138 | libwebrtc_isacfix_neon |
| 139 | endif |
| 140 | |
| 141 | LOCAL_SHARED_LIBRARIES := \ |
| 142 | libutils |
| 143 | |
| 144 | LOCAL_MODULE:= webrtc_isac_test |
| 145 | |
| 146 | ifdef NDK_ROOT |
| 147 | include $(BUILD_EXECUTABLE) |
| 148 | else |
| 149 | include $(BUILD_NATIVE_TEST) |
| 150 | endif |