Commit b7456184 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Moved android recipes for submodules/externals/build/webrtc here

parent 5175b37e
MY_WEBRTC_COMMON_DEFS := \
-DWEBRTC_ANDROID \
-DWEBRTC_LINUX \
-DWEBRTC_CLOCK_TYPE_REALTIME \
-DWEBRTC_POSIX \
-fPIC
ifneq (,$(findstring armeabi,$(TARGET_ARCH_ABI)))
MY_WEBRTC_COMMON_DEFS += -DWEBRTC_ARCH_ARM
endif
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
MY_WEBRTC_COMMON_DEFS += -DWEBRTC_DETECT_ARM_NEON
endif
#turn off warnings since we cannot fix them
MY_WEBRTC_COMMON_DEFS += -w
# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
MY_WEBRTC_PATH := $(call my-dir)/../../
LOCAL_PATH := $(MY_WEBRTC_PATH)/../../webrtc/webrtc/common_audio/signal_processing
include $(CLEAR_VARS)
include $(MY_WEBRTC_PATH)/Android.mk
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_spl
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := \
auto_corr_to_refl_coef.c \
auto_correlation.c \
complex_fft.c \
copy_set_operations.c \
cross_correlation.c \
division_operations.c \
dot_product_with_scale.c \
downsample_fast.c \
energy.c \
filter_ar.c \
filter_ma_fast_q12.c \
get_hanning_window.c \
get_scaling_square.c \
ilbc_specific_functions.c \
levinson_durbin.c \
lpc_to_refl_coef.c \
min_max_operations.c \
randomization_functions.c \
real_fft.c \
refl_coef_to_lpc.c \
resample.c \
resample_48khz.c \
resample_by_2.c \
resample_by_2_internal.c \
resample_fractional.c \
spl_init.c \
spl_sqrt.c \
splitting_filter.c \
sqrt_of_one_minus_x_squared.c \
vector_scaling_operations.c
# Flags passed to both C and C++ files.
LOCAL_CFLAGS := \
$(MY_WEBRTC_COMMON_DEFS)
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/include \
$(LOCAL_PATH)/../.. \
$(LOCAL_PATH)/../../..
ifeq ($(ARCH_ARM_HAVE_ARMV7A),true)
LOCAL_SRC_FILES += \
filter_ar_fast_q12_armv7.S
else
LOCAL_SRC_FILES += \
filter_ar_fast_q12.c
endif
ifeq ($(TARGET_ARCH),arm)
LOCAL_SRC_FILES += \
complex_bit_reverse_arm.S \
spl_sqrt_floor_arm.S
else
LOCAL_SRC_FILES += \
complex_bit_reverse.c \
spl_sqrt_floor.c
endif
LOCAL_SHARED_LIBRARIES := libstlport
ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
LOCAL_LDLIBS += -ldl -lpthread
endif
ifneq ($(TARGET_SIMULATOR),true)
LOCAL_SHARED_LIBRARIES += libdl
endif
ifndef NDK_ROOT
include external/stlport/libstlport.mk
endif
include $(BUILD_STATIC_LIBRARY)
#########################
# Build the neon library.
ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
include $(CLEAR_VARS)
include $(MY_WEBRTC_PATH)/Android.mk
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_spl_neon
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := \
cross_correlation_neon.c \
downsample_fast_neon.c \
min_max_operations_neon.c
# Flags passed to both C and C++ files.
LOCAL_CFLAGS := \
$(MY_WEBRTC_COMMON_DEFS) \
$(MY_ARM_CFLAGS_NEON) \
-mfloat-abi=softfp -mfpu=neon
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/include \
$(LOCAL_PATH)/../.. \
$(LOCAL_PATH)/../../..
ifndef NDK_ROOT
include external/stlport/libstlport.mk
endif
include $(BUILD_STATIC_LIBRARY)
endif # ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
#############################
# Build the non-neon library.
MY_WEBRTC_PATH := $(call my-dir)/../../../../../../
LOCAL_PATH := $(MY_WEBRTC_PATH)/../../webrtc/modules/audio_coding/codecs/isac/fix/source
include $(CLEAR_VARS)
include $(MY_WEBRTC_PATH)/Android.mk
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_isacfix
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := \
arith_routines.c \
arith_routines_hist.c \
arith_routines_logist.c \
bandwidth_estimator.c \
decode.c \
decode_bwe.c \
decode_plc.c \
encode.c \
entropy_coding.c \
fft.c \
filterbank_tables.c \
filterbanks.c \
filters.c \
initialize.c \
isacfix.c \
lattice.c \
lpc_masking_model.c \
lpc_tables.c \
pitch_estimator.c \
pitch_filter.c \
pitch_gain_tables.c \
pitch_lag_tables.c \
spectrum_ar_model_tables.c \
transform.c
ifeq ($(ARCH_ARM_HAVE_ARMV7A),true)
# Using .S (instead of .s) extention is to include a C header file in assembly.
LOCAL_SRC_FILES += \
lattice_armv7.S \
pitch_filter_armv6.S
else
LOCAL_SRC_FILES += \
lattice_c.c \
pitch_filter_c.c
endif
# Flags passed to both C and C++ files.
LOCAL_CFLAGS := \
$(MY_WEBRTC_COMMON_DEFS)
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/../../../../../.. \
$(MY_WEBRTC_PATH)/../../webrtc/common_audio/signal_processing/include
LOCAL_STATIC_LIBRARIES += libwebrtc_system_wrappers
LOCAL_SHARED_LIBRARIES := \
libcutils \
libdl \
libstlport
ifndef NDK_ROOT
include external/stlport/libstlport.mk
endif
include $(BUILD_STATIC_LIBRARY)
#########################
# Build the neon library.
ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_isacfix_neon
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := \
filters_neon.c \
lattice_neon.S \
lpc_masking_model_neon.S
# Flags passed to both C and C++ files.
LOCAL_CFLAGS := \
$(MY_WEBRTC_COMMON_DEFS) \
-mfpu=neon \
-mfloat-abi=softfp \
-flax-vector-conversions
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/../../../../../.. \
$(MY_WEBRTC_PATH)/../../webrtc/common_audio/signal_processing/include
ifndef NDK_ROOT
include external/stlport/libstlport.mk
endif
include $(BUILD_STATIC_LIBRARY)
endif # ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
###########################
# isac test app
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_CPP_EXTENSION := .cc
LOCAL_SRC_FILES:= ../test/kenny.c
# Flags passed to both C and C++ files.
LOCAL_CFLAGS := $(MY_WEBRTC_COMMON_DEFS)
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/../../../../../..
LOCAL_STATIC_LIBRARIES := \
libwebrtc_isacfix \
libwebrtc_spl \
libwebrtc_system_wrappers
ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
LOCAL_STATIC_LIBRARIES += \
libwebrtc_isacfix_neon
endif
LOCAL_SHARED_LIBRARIES := \
libutils
LOCAL_MODULE:= webrtc_isac_test
ifdef NDK_ROOT
include $(BUILD_EXECUTABLE)
else
include $(BUILD_NATIVE_TEST)
endif
#############################
# Build the non-neon library.
MY_WEBRTC_PATH := $(call my-dir)/../../../
LOCAL_PATH := $(MY_WEBRTC_PATH)/../../webrtc/webrtc/modules/audio_processing/aecm
include $(CLEAR_VARS)
include $(MY_WEBRTC_PATH)/Android.mk
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_aecm
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := \
echo_control_mobile.c \
aecm_core.c \
aecm_core_c.c
# Flags passed to both C and C++ files.
LOCAL_CFLAGS := $(MY_WEBRTC_COMMON_DEFS)
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/include \
$(LOCAL_PATH)/../utility \
$(LOCAL_PATH)/../../.. \
$(LOCAL_PATH)/../../../common_audio/signal_processing/include \
$(LOCAL_PATH)/../../../system_wrappers/interface \
$(LOCAL_PATH)/../../../.. \
LOCAL_STATIC_LIBRARIES += libwebrtc_system_wrappers
LOCAL_SHARED_LIBRARIES := \
libcutils \
libdl \
libstlport
ifndef NDK_ROOT
include external/stlport/libstlport.mk
endif
include $(BUILD_STATIC_LIBRARY)
#########################
# Build the neon library.
ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
include $(CLEAR_VARS)
include $(MY_WEBRTC_PATH)/Android.mk
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_aecm_neon
LOCAL_MODULE_TAGS := optional
# Generate a header file aecm_core_neon_offsets.h which will be included in
# assembly file aecm_core_neon.S, from file aecm_core_neon_offsets.c.
#$(LOCAL_PATH)/aecm_core_neon_offsets.h: $(LOCAL_PATH)/aecm_core_neon_offsets.S
# python $(LOCAL_PATH)/../../../build/generate_asm_header.py $^ $@ offset_aecm_
#
#$(LOCAL_PATH)/aecm_core_neon_offsets.S: $(LOCAL_PATH)/aecm_core_neon_offsets.c
# $(TARGET_CC) $(addprefix -I, $(LOCAL_INCLUDES)) $(addprefix -isystem ,\
# $(TARGET_C_INCLUDES)) -S -o $@ $^
#
#$(LOCAL_PATH)/aecm_core_neon.S: $(LOCAL_PATH)/aecm_core_neon_offsets.h
LOCAL_SRC_FILES := aecm_core_neon.c
# Flags passed to both C and C++ files.
LOCAL_CFLAGS := \
$(MY_WEBRTC_COMMON_DEFS) \
-mfpu=neon \
-mfloat-abi=softfp \
-flax-vector-conversions
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/include \
$(LOCAL_PATH)/../../.. \
$(LOCAL_PATH)/../../../common_audio/signal_processing/include \
$(MY_WEBRTC_PATH)/modules/audio_processing/aecm \
$(LOCAL_PATH)/../../../.. \
LOCAL_INCLUDES := $(LOCAL_C_INCLUDES)
ifndef NDK_ROOT
include external/stlport/libstlport.mk
endif
include $(BUILD_STATIC_LIBRARY)
endif # ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
#define offset_aecm_dfaCleanQDomain 13976
#define offset_aecm_outBuf 15988
#define offset_aecm_xBuf 15976
#define offset_aecm_dBufNoisy 15984
#define offset_aecm_dBufClean 15980
#define offset_aecm_channelStored 15964
#define offset_aecm_channelAdapt16 15968
#define offset_aecm_channelAdapt32 15972
# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
MY_WEBRTC_PATH := $(call my-dir)/../../../
LOCAL_PATH := $(MY_WEBRTC_PATH)/../../webrtc/webrtc/modules/audio_processing/utility
include $(CLEAR_VARS)
include $(MY_WEBRTC_PATH)/Android.mk
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_apm_utility
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := \
../../../common_audio/ring_buffer.c \
delay_estimator.c \
delay_estimator_wrapper.c
# Flags passed to both C and C++ files.
LOCAL_CFLAGS := \
$(MY_WEBRTC_COMMON_DEFS)
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES := \
$(LOCAL_PATH) \
$(LOCAL_PATH)/../../.. \
$(LOCAL_PATH)/../../../common_audio/signal_processing/include \
$(LOCAL_PATH)/../../../.. \
LOCAL_SHARED_LIBRARIES := \
libcutils \
libdl \
libstlport
ifndef NDK_ROOT
include external/stlport/libstlport.mk
endif
include $(BUILD_STATIC_LIBRARY)
# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
MY_WEBRTC_PATH := $(call my-dir)/../
LOCAL_PATH := $(MY_WEBRTC_PATH)/../../webrtc/webrtc/system_wrappers/source
include $(CLEAR_VARS)
include $(MY_WEBRTC_PATH)/Android.mk
LOCAL_ARM_MODE := arm
LOCAL_MODULE := libwebrtc_system_wrappers
LOCAL_MODULE_TAGS := optional
LOCAL_CPP_EXTENSION := .cc
LOCAL_SRC_FILES := \
cpu_features_android.c
LOCAL_CFLAGS := \
$(MY_WEBRTC_COMMON_DEFS)
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../.. \
$(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/spreadsortlib
LOCAL_SHARED_LIBRARIES := \
libcutils \
libdl \
libstlport
LOCAL_STATIC_LIBRARIES := cpufeatures
ifndef NDK_ROOT
include external/stlport/libstlport.mk
endif
include $(BUILD_STATIC_LIBRARY)
$(call import-module,android/cpufeatures)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment