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