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 \ |
| 36 | $(LOCAL_PATH)/../../../system_wrappers/interface |
| 37 | |
| 38 | LOCAL_STATIC_LIBRARIES += libwebrtc_system_wrappers |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 39 | |
leozwang@google.com | 58d09cf | 2011-07-25 22:49:00 +0000 | [diff] [blame] | 40 | LOCAL_SHARED_LIBRARIES := \ |
| 41 | libcutils \ |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 42 | libdl \ |
| 43 | libstlport |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 44 | |
leozwang@google.com | 58d09cf | 2011-07-25 22:49:00 +0000 | [diff] [blame] | 45 | ifndef NDK_ROOT |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 46 | include external/stlport/libstlport.mk |
leozwang@google.com | 58d09cf | 2011-07-25 22:49:00 +0000 | [diff] [blame] | 47 | endif |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 48 | include $(BUILD_STATIC_LIBRARY) |
kma@webrtc.org | b59c031 | 2011-12-03 18:34:50 +0000 | [diff] [blame] | 49 | |
| 50 | ############################# |
| 51 | # Build the neon library. |
kma@webrtc.org | 746f9e3 | 2012-01-04 17:47:57 +0000 | [diff] [blame] | 52 | ifeq ($(WEBRTC_BUILD_NEON_LIBS),true) |
kma@webrtc.org | b59c031 | 2011-12-03 18:34:50 +0000 | [diff] [blame] | 53 | |
| 54 | include $(CLEAR_VARS) |
| 55 | |
kma@webrtc.org | 746f9e3 | 2012-01-04 17:47:57 +0000 | [diff] [blame] | 56 | LOCAL_ARM_MODE := arm |
kma@webrtc.org | b59c031 | 2011-12-03 18:34:50 +0000 | [diff] [blame] | 57 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 58 | LOCAL_MODULE := libwebrtc_ns_neon |
| 59 | LOCAL_MODULE_TAGS := optional |
kma@webrtc.org | 0d321da | 2012-05-26 01:05:27 +0000 | [diff] [blame] | 60 | GEN := $(LOCAL_PATH)/nsx_core_neon_offsets.h |
kma@webrtc.org | b59c031 | 2011-12-03 18:34:50 +0000 | [diff] [blame] | 61 | |
kma@webrtc.org | 0d321da | 2012-05-26 01:05:27 +0000 | [diff] [blame] | 62 | # Generate a header file nsx_core_neon_offsets.h which will be included in |
| 63 | # assembly file nsx_core_neon.S, from file nsx_core_neon_offsets.c. |
leozwang@webrtc.org | 534e495 | 2012-10-22 21:21:52 +0000 | [diff] [blame] | 64 | $(GEN): $(LOCAL_PATH)/../../../build/generate_asm_header.py \ |
kma@webrtc.org | 0d321da | 2012-05-26 01:05:27 +0000 | [diff] [blame] | 65 | $(intermediates)/nsx_core_neon_offsets.S |
| 66 | @python $^ $@ offset_nsx_ |
| 67 | |
| 68 | $(intermediates)/nsx_core_neon_offsets.S: $(LOCAL_PATH)/nsx_core_neon_offsets.c |
| 69 | @$(TARGET_CC) $(addprefix -I, $(LOCAL_INCLUDES)) $(addprefix -isystem ,\ |
| 70 | $(TARGET_C_INCLUDES)) -S -o $@ $^ |
| 71 | |
| 72 | LOCAL_GENERATED_SOURCES := $(GEN) |
| 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 := \ |
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)/../../.. \ |
| 85 | $(LOCAL_PATH)/../../../common_audio/signal_processing/include |
| 86 | |
kma@webrtc.org | 0d321da | 2012-05-26 01:05:27 +0000 | [diff] [blame] | 87 | LOCAL_INCLUDES := $(LOCAL_C_INCLUDES) |
| 88 | |
kma@webrtc.org | b59c031 | 2011-12-03 18:34:50 +0000 | [diff] [blame] | 89 | ifndef NDK_ROOT |
| 90 | include external/stlport/libstlport.mk |
| 91 | endif |
| 92 | include $(BUILD_STATIC_LIBRARY) |
kma@webrtc.org | 746f9e3 | 2012-01-04 17:47:57 +0000 | [diff] [blame] | 93 | endif # ifeq ($(WEBRTC_BUILD_NEON_LIBS),true) |