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 | |
Alexander Gutkin | a645182 | 2012-09-17 08:53:18 +0100 | [diff] [blame] | 48 | # Using .S (instead of .s) extention is to include a C header file in assembly. |
Ying Wang | 792d546 | 2014-03-10 15:26:43 -0700 | [diff] [blame] | 49 | my_as_src := \ |
Alexander Gutkin | a645182 | 2012-09-17 08:53:18 +0100 | [diff] [blame] | 50 | lattice_armv7.S \ |
| 51 | pitch_filter_armv6.S |
Ying Wang | 792d546 | 2014-03-10 15:26:43 -0700 | [diff] [blame] | 52 | my_c_src := \ |
Alexander Gutkin | 69857ee | 2012-09-20 11:57:35 +0100 | [diff] [blame] | 53 | lattice_c.c \ |
| 54 | pitch_filter_c.c |
Ying Wang | 792d546 | 2014-03-10 15:26:43 -0700 | [diff] [blame] | 55 | LOCAL_SRC_FILES_arm += $(my_as_src) |
| 56 | LOCAL_SRC_FILES_x86 += $(my_c_src) |
| 57 | LOCAL_SRC_FILES_mips += $(my_c_src) |
| 58 | LOCAL_SRC_FILES_arm64 += $(my_c_src) |
| 59 | LOCAL_SRC_FILES_x86_64 += $(my_c_src) |
| 60 | LOCAL_SRC_FILES_mips64 += $(my_c_src) |
Alexander Gutkin | a645182 | 2012-09-17 08:53:18 +0100 | [diff] [blame] | 61 | |
| 62 | # Flags passed to both C and C++ files. |
| 63 | LOCAL_CFLAGS := \ |
| 64 | $(MY_WEBRTC_COMMON_DEFS) |
| 65 | |
Ying Wang | 792d546 | 2014-03-10 15:26:43 -0700 | [diff] [blame] | 66 | LOCAL_CFLAGS_arm := $(MY_WEBRTC_COMMON_DEFS_arm) |
| 67 | LOCAL_CFLAGS_x86 := $(MY_WEBRTC_COMMON_DEFS_x86) |
| 68 | LOCAL_CFLAGS_mips := $(MY_WEBRTC_COMMON_DEFS_mips) |
| 69 | LOCAL_CFLAGS_arm64 := $(MY_WEBRTC_COMMON_DEFS_arm64) |
| 70 | LOCAL_CFLAGS_x86_64 := $(MY_WEBRTC_COMMON_DEFS_x86_64) |
| 71 | LOCAL_CFLAGS_mips64 := $(MY_WEBRTC_COMMON_DEFS_mips64) |
| 72 | |
Alexander Gutkin | a645182 | 2012-09-17 08:53:18 +0100 | [diff] [blame] | 73 | LOCAL_C_INCLUDES := \ |
| 74 | $(LOCAL_PATH)/../interface \ |
| 75 | $(LOCAL_PATH)/../../../../../.. \ |
| 76 | $(LOCAL_PATH)/../../../../../../common_audio/signal_processing/include |
| 77 | |
| 78 | LOCAL_STATIC_LIBRARIES += libwebrtc_system_wrappers |
| 79 | |
| 80 | LOCAL_SHARED_LIBRARIES := \ |
| 81 | libcutils \ |
Przemyslaw Szczepaniak | 5d8e19e | 2013-02-04 18:00:41 +0000 | [diff] [blame] | 82 | libdl |
Alexander Gutkin | a645182 | 2012-09-17 08:53:18 +0100 | [diff] [blame] | 83 | |
| 84 | ifndef NDK_ROOT |
Przemyslaw Szczepaniak | 5d8e19e | 2013-02-04 18:00:41 +0000 | [diff] [blame] | 85 | ifndef WEBRTC_STL |
| 86 | LOCAL_SHARED_LIBRARIES += libstlport |
Alexander Gutkin | a645182 | 2012-09-17 08:53:18 +0100 | [diff] [blame] | 87 | include external/stlport/libstlport.mk |
Przemyslaw Szczepaniak | 5d8e19e | 2013-02-04 18:00:41 +0000 | [diff] [blame] | 88 | else |
| 89 | LOCAL_NDK_STL_VARIANT := $(WEBRTC_STL) |
| 90 | LOCAL_SDK_VERSION := 14 |
| 91 | LOCAL_MODULE := $(LOCAL_MODULE)_$(WEBRTC_STL) |
Alexander Gutkin | a645182 | 2012-09-17 08:53:18 +0100 | [diff] [blame] | 92 | endif |
Przemyslaw Szczepaniak | 5d8e19e | 2013-02-04 18:00:41 +0000 | [diff] [blame] | 93 | else |
| 94 | LOCAL_SHARED_LIBRARIES += libstlport |
| 95 | endif |
| 96 | |
Alexander Gutkin | a645182 | 2012-09-17 08:53:18 +0100 | [diff] [blame] | 97 | include $(BUILD_STATIC_LIBRARY) |
| 98 | |
| 99 | ######################### |
| 100 | # Build the neon library. |
| 101 | ifeq ($(WEBRTC_BUILD_NEON_LIBS),true) |
| 102 | |
| 103 | include $(CLEAR_VARS) |
| 104 | |
| 105 | LOCAL_ARM_MODE := arm |
| 106 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 107 | LOCAL_MODULE := libwebrtc_isacfix_neon |
| 108 | LOCAL_MODULE_TAGS := optional |
| 109 | LOCAL_SRC_FILES := \ |
| 110 | filters_neon.c \ |
| 111 | lattice_neon.S \ |
| 112 | lpc_masking_model_neon.S |
| 113 | |
| 114 | # Flags passed to both C and C++ files. |
| 115 | LOCAL_CFLAGS := \ |
| 116 | $(MY_WEBRTC_COMMON_DEFS) \ |
| 117 | -mfpu=neon \ |
| 118 | -mfloat-abi=softfp \ |
| 119 | -flax-vector-conversions |
| 120 | |
Ying Wang | 9fb5517 | 2014-03-10 18:16:38 -0700 | [diff] [blame] | 121 | LOCAL_MODULE_TARGET_ARCH := arm |
Ying Wang | 792d546 | 2014-03-10 15:26:43 -0700 | [diff] [blame] | 122 | LOCAL_CFLAGS_arm := $(MY_WEBRTC_COMMON_DEFS_arm) |
Ying Wang | 792d546 | 2014-03-10 15:26:43 -0700 | [diff] [blame] | 123 | |
Alexander Gutkin | a645182 | 2012-09-17 08:53:18 +0100 | [diff] [blame] | 124 | LOCAL_C_INCLUDES := \ |
| 125 | $(LOCAL_PATH)/../interface \ |
| 126 | $(LOCAL_PATH)/../../../../../.. \ |
| 127 | $(LOCAL_PATH)/../../../../../../common_audio/signal_processing/include |
| 128 | |
Przemyslaw Szczepaniak | fea56d8 | 2013-02-04 17:33:41 +0000 | [diff] [blame] | 129 | ifndef NDK_ROOT |
Przemyslaw Szczepaniak | 5d8e19e | 2013-02-04 18:00:41 +0000 | [diff] [blame] | 130 | ifndef WEBRTC_STL |
| 131 | LOCAL_SHARED_LIBRARIES += libstlport |
Przemyslaw Szczepaniak | fea56d8 | 2013-02-04 17:33:41 +0000 | [diff] [blame] | 132 | include external/stlport/libstlport.mk |
Przemyslaw Szczepaniak | 5d8e19e | 2013-02-04 18:00:41 +0000 | [diff] [blame] | 133 | else |
| 134 | LOCAL_NDK_STL_VARIANT := $(WEBRTC_STL) |
| 135 | LOCAL_SDK_VERSION := 14 |
| 136 | LOCAL_MODULE := $(LOCAL_MODULE)_$(WEBRTC_STL) |
Przemyslaw Szczepaniak | fea56d8 | 2013-02-04 17:33:41 +0000 | [diff] [blame] | 137 | endif |
Przemyslaw Szczepaniak | 5d8e19e | 2013-02-04 18:00:41 +0000 | [diff] [blame] | 138 | else |
| 139 | LOCAL_SHARED_LIBRARIES += libstlport |
| 140 | endif |
| 141 | |
Alexander Gutkin | a645182 | 2012-09-17 08:53:18 +0100 | [diff] [blame] | 142 | include $(BUILD_STATIC_LIBRARY) |
| 143 | |
| 144 | endif # ifeq ($(WEBRTC_BUILD_NEON_LIBS),true) |