Clean up ANDROID macro definitions [audio_processing]

Review URL: http://webrtc-codereview.appspot.com/95001

git-svn-id: http://webrtc.googlecode.com/svn/trunk@251 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
leozwang@google.com 2011-07-25 22:49:00 +00:00
parent 3a2be19453
commit 58d09cfb24
7 changed files with 70 additions and 159 deletions

View File

@ -13,7 +13,6 @@ include $(CLEAR_VARS)
LOCAL_MODULE_CLASS := STATIC_LIBRARIES LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_aec LOCAL_MODULE := libwebrtc_aec
LOCAL_MODULE_TAGS := optional LOCAL_MODULE_TAGS := optional
LOCAL_GENERATED_SOURCES :=
LOCAL_SRC_FILES := \ LOCAL_SRC_FILES := \
echo_cancellation.c \ echo_cancellation.c \
resampler.c \ resampler.c \
@ -21,41 +20,32 @@ LOCAL_SRC_FILES := \
aec_rdft.c aec_rdft.c
# Flags passed to both C and C++ files. # Flags passed to both C and C++ files.
MY_CFLAGS := LOCAL_CFLAGS := \
MY_CFLAGS_C := $(MY_WEBRTC_COMMON_DEFS)
MY_DEFS := '-DNO_TCMALLOC' \
'-DNO_HEAPCHECKER' \ ifeq ($(TARGET_ARCH),x86)
'-DWEBRTC_TARGET_PC' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_THREAD_RR'
ifeq ($(TARGET_ARCH),arm)
MY_DEFS += \
'-DWEBRTC_ANDROID' \
'-DANDROID'
else
LOCAL_SRC_FILES += \ LOCAL_SRC_FILES += \
aec_core_sse2.c \ aec_core_sse2.c \
aec_rdft_sse2.c aec_rdft_sse2.c
# TODO(leozwang): __SSE2__ is defined by chromium/webrtc
# Remove it when we have a platform-independent SSE2 flag.
# And it should be in common flags.
LOCAL_CFLAGS += \
'-D__SSE2__'
endif endif
LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
# Include paths placed before CFLAGS/CPPFLAGS LOCAL_C_INCLUDES := \
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../.. \
$(LOCAL_PATH)/../interface \ $(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/../../../utility \ $(LOCAL_PATH)/../../../utility \
$(LOCAL_PATH)/../../../../.. \
$(LOCAL_PATH)/../../../../../common_audio/signal_processing_library/main/interface $(LOCAL_PATH)/../../../../../common_audio/signal_processing_library/main/interface
# Flags passed to only C++ (and not C) files. LOCAL_SHARED_LIBRARIES := \
LOCAL_CPPFLAGS := libcutils \
LOCAL_LDFLAGS :=
LOCAL_STATIC_LIBRARIES :=
LOCAL_SHARED_LIBRARIES := libcutils \
libdl \ libdl \
libstlport libstlport
LOCAL_ADDITIONAL_DEPENDENCIES :=
ifndef NDK_ROOT
include external/stlport/libstlport.mk include external/stlport/libstlport.mk
endif
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)

View File

@ -14,42 +14,27 @@ LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_aecm LOCAL_MODULE := libwebrtc_aecm
LOCAL_MODULE_TAGS := optional LOCAL_MODULE_TAGS := optional
LOCAL_GENERATED_SOURCES := LOCAL_SRC_FILES := \
LOCAL_SRC_FILES := echo_control_mobile.c \ echo_control_mobile.c \
aecm_core.c aecm_core.c
# Flags passed to both C and C++ files. # Flags passed to both C and C++ files.
MY_CFLAGS := LOCAL_CFLAGS := \
MY_CFLAGS_C := $(MY_WEBRTC_COMMON_DEFS)
MY_DEFS := '-DNO_TCMALLOC' \
'-DNO_HEAPCHECKER' \
'-DWEBRTC_TARGET_PC' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_THREAD_RR'
ifeq ($(TARGET_ARCH),arm)
MY_DEFS += \
'-DWEBRTC_ANDROID' \
'-DANDROID'
endif
LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
# Include paths placed before CFLAGS/CPPFLAGS # Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../.. \ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \ $(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/../../../utility \ $(LOCAL_PATH)/../../../utility \
$(LOCAL_PATH)/../../../../.. \
$(LOCAL_PATH)/../../../../../common_audio/signal_processing_library/main/interface $(LOCAL_PATH)/../../../../../common_audio/signal_processing_library/main/interface
# Flags passed to only C++ (and not C) files. LOCAL_SHARED_LIBRARIES := \
LOCAL_CPPFLAGS := libcutils \
LOCAL_LDFLAGS :=
LOCAL_STATIC_LIBRARIES :=
LOCAL_SHARED_LIBRARIES := libcutils \
libdl \ libdl \
libstlport libstlport
LOCAL_ADDITIONAL_DEPENDENCIES :=
ifndef NDK_ROOT
include external/stlport/libstlport.mk include external/stlport/libstlport.mk
endif
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)

View File

@ -8,42 +8,26 @@ LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_agc LOCAL_MODULE := libwebrtc_agc
LOCAL_MODULE_TAGS := optional LOCAL_MODULE_TAGS := optional
LOCAL_GENERATED_SOURCES := LOCAL_SRC_FILES := \
LOCAL_SRC_FILES := analog_agc.c \ analog_agc.c \
digital_agc.c digital_agc.c
# Flags passed to both C and C++ files. # Flags passed to both C and C++ files.
MY_CFLAGS := LOCAL_CFLAGS := \
MY_CFLAGS_C := $(MY_WEBRTC_COMMON_DEFS)
MY_DEFS := '-DNO_TCMALLOC' \
'-DNO_HEAPCHECKER' \
'-DWEBRTC_TARGET_PC' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_THREAD_RR'
ifeq ($(TARGET_ARCH),arm)
MY_DEFS += \
'-DWEBRTC_ANDROID' \
'-DANDROID'
endif
LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
# Include paths placed before CFLAGS/CPPFLAGS # Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../.. \ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \ $(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/../../../../.. \
$(LOCAL_PATH)/../../../../../common_audio/signal_processing_library/main/interface $(LOCAL_PATH)/../../../../../common_audio/signal_processing_library/main/interface
# Flags passed to only C++ (and not C) files. LOCAL_SHARED_LIBRARIES := \
LOCAL_CPPFLAGS := libcutils \
LOCAL_LDFLAGS :=
LOCAL_STATIC_LIBRARIES :=
# Duplicate the static libraries to fix circular references
LOCAL_STATIC_LIBRARIES += $(LOCAL_STATIC_LIBRARIES)
LOCAL_SHARED_LIBRARIES := libcutils \
libdl \ libdl \
libstlport libstlport
LOCAL_ADDITIONAL_DEPENDENCIES :=
ifndef NDK_ROOT
include external/stlport/libstlport.mk include external/stlport/libstlport.mk
endif
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)

View File

@ -14,8 +14,8 @@ LOCAL_ARM_MODE := arm
LOCAL_MODULE := libwebrtc_apm LOCAL_MODULE := libwebrtc_apm
LOCAL_MODULE_TAGS := optional LOCAL_MODULE_TAGS := optional
LOCAL_CPP_EXTENSION := .cc LOCAL_CPP_EXTENSION := .cc
LOCAL_GENERATED_SOURCES := LOCAL_SRC_FILES := \
LOCAL_SRC_FILES := audio_buffer.cc \ audio_buffer.cc \
audio_processing_impl.cc \ audio_processing_impl.cc \
echo_cancellation_impl.cc \ echo_cancellation_impl.cc \
echo_control_mobile_impl.cc \ echo_control_mobile_impl.cc \
@ -28,48 +28,31 @@ LOCAL_SRC_FILES := audio_buffer.cc \
voice_detection_impl.cc voice_detection_impl.cc
# Flags passed to both C and C++ files. # Flags passed to both C and C++ files.
MY_CFLAGS := LOCAL_CFLAGS := \
MY_CFLAGS_C := $(MY_WEBRTC_COMMON_DEFS) \
MY_DEFS := '-DNO_TCMALLOC' \
'-DNO_HEAPCHECKER' \
'-DWEBRTC_TARGET_PC' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_NS_FIXED' '-DWEBRTC_NS_FIXED'
# floating point # floating point
# -DWEBRTC_NS_FLOAT' # -DWEBRTC_NS_FLOAT'
ifeq ($(TARGET_ARCH),arm)
MY_DEFS += \
'-DWEBRTC_ANDROID' \
'-DANDROID'
endif
LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
# Include paths placed before CFLAGS/CPPFLAGS LOCAL_C_INCLUDES := \
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../.. \
$(LOCAL_PATH)/../interface \ $(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/../../../interface \
$(LOCAL_PATH)/../../../../system_wrappers/interface \
$(LOCAL_PATH)/../../aec/main/interface \ $(LOCAL_PATH)/../../aec/main/interface \
$(LOCAL_PATH)/../../aecm/main/interface \ $(LOCAL_PATH)/../../aecm/main/interface \
$(LOCAL_PATH)/../../agc/main/interface \ $(LOCAL_PATH)/../../agc/main/interface \
$(LOCAL_PATH)/../../ns/main/interface \ $(LOCAL_PATH)/../../ns/main/interface \
$(LOCAL_PATH)/../../../interface \
$(LOCAL_PATH)/../../../.. \
$(LOCAL_PATH)/../../../../common_audio/signal_processing_library/main/interface \ $(LOCAL_PATH)/../../../../common_audio/signal_processing_library/main/interface \
$(LOCAL_PATH)/../../../../common_audio/vad/main/interface $(LOCAL_PATH)/../../../../common_audio/vad/main/interface \
$(LOCAL_PATH)/../../../../system_wrappers/interface
# Flags passed to only C++ (and not C) files. LOCAL_SHARED_LIBRARIES := \
LOCAL_CPPFLAGS := libcutils \
LOCAL_LDFLAGS :=
LOCAL_STATIC_LIBRARIES :=
LOCAL_SHARED_LIBRARIES := libcutils \
libdl \ libdl \
libstlport libstlport
LOCAL_ADDITIONAL_DEPENDENCIES := ifndef NDK_ROOT
include external/stlport/libstlport.mk include external/stlport/libstlport.mk
endif
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)

View File

@ -19,20 +19,14 @@ LOCAL_SRC_FILES:= \
# Flags passed to both C and C++ files. # Flags passed to both C and C++ files.
LOCAL_CFLAGS := \ LOCAL_CFLAGS := \
'-DWEBRTC_TARGET_PC' \ $(MY_WEBRTC_COMMON_DEFS)
'-DWEBRTC_LINUX' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_ANDROID' \
'-DANDROID'
LOCAL_CPPFLAGS :=
LOCAL_LDFLAGS :=
LOCAL_C_INCLUDES := \ LOCAL_C_INCLUDES := \
external/gtest/include \
$(LOCAL_PATH)/../../../../../system_wrappers/interface \
$(LOCAL_PATH)/../../interface \ $(LOCAL_PATH)/../../interface \
$(LOCAL_PATH)/../../../../interface \ $(LOCAL_PATH)/../../../../interface \
$(LOCAL_PATH)/../../../../.. $(LOCAL_PATH)/../../../../.. \
$(LOCAL_PATH)/../../../../../system_wrappers/interface \
external/gtest/include \
LOCAL_STATIC_LIBRARIES := \ LOCAL_STATIC_LIBRARIES := \
libgtest libgtest
@ -44,5 +38,7 @@ LOCAL_SHARED_LIBRARIES := \
LOCAL_MODULE:= webrtc_apm_process_test LOCAL_MODULE:= webrtc_apm_process_test
ifndef NDK_ROOT
include external/stlport/libstlport.mk include external/stlport/libstlport.mk
endif
include $(BUILD_EXECUTABLE) include $(BUILD_EXECUTABLE)

View File

@ -16,37 +16,22 @@ LOCAL_SRC_FILES := \
# noise_suppression.c ns_core.c # noise_suppression.c ns_core.c
# Flags passed to both C and C++ files. # Flags passed to both C and C++ files.
MY_CFLAGS := LOCAL_CFLAGS := \
MY_CFLAGS_C := $(MY_WEBRTC_COMMON_DEFS)
MY_DEFS := '-DNO_TCMALLOC' \
'-DNO_HEAPCHECKER' \
'-DWEBRTC_TARGET_PC' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_THREAD_RR'
ifeq ($(TARGET_ARCH),arm)
MY_DEFS += \
'-DWEBRTC_ANDROID' \
'-DANDROID'
endif
LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
# Include paths placed before CFLAGS/CPPFLAGS # Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../.. \ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \ $(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/../../../utility \ $(LOCAL_PATH)/../../../utility \
$(LOCAL_PATH)/../../../../.. \
$(LOCAL_PATH)/../../../../../common_audio/signal_processing_library/main/interface $(LOCAL_PATH)/../../../../../common_audio/signal_processing_library/main/interface
# Flags passed to only C++ (and not C) files. LOCAL_SHARED_LIBRARIES := \
LOCAL_CPPFLAGS := libcutils \
LOCAL_LDFLAGS :=
LOCAL_STATIC_LIBRARIES :=
LOCAL_SHARED_LIBRARIES := libcutils \
libdl \ libdl \
libstlport libstlport
LOCAL_ADDITIONAL_DEPENDENCIES :=
ifndef NDK_ROOT
include external/stlport/libstlport.mk include external/stlport/libstlport.mk
endif
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)

View File

@ -14,36 +14,24 @@ LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_apm_utility LOCAL_MODULE := libwebrtc_apm_utility
LOCAL_MODULE_TAGS := optional LOCAL_MODULE_TAGS := optional
LOCAL_GENERATED_SOURCES := LOCAL_SRC_FILES := \
LOCAL_SRC_FILES := fft4g.c \ fft4g.c \
ring_buffer.c ring_buffer.c
# Flags passed to both C and C++ files. # Flags passed to both C and C++ files.
MY_CFLAGS := LOCAL_CFLAGS := \
MY_CFLAGS_C := $(MY_WEBRTC_COMMON_DEFS)
MY_DEFS := '-DNO_TCMALLOC' \
'-DNO_HEAPCHECKER' \
'-DWEBRTC_TARGET_PC' \
'-DWEBRTC_LINUX' \
'-DWEBRTC_THREAD_RR' \
'-DWEBRTC_ANDROID' \
'-DANDROID'
LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
# Include paths placed before CFLAGS/CPPFLAGS # Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES := \ LOCAL_C_INCLUDES := \
$(LOCAL_PATH) $(LOCAL_PATH)
# Flags passed to only C++ (and not C) files. LOCAL_SHARED_LIBRARIES := \
LOCAL_CPPFLAGS := libcutils \
LOCAL_LDFLAGS :=
LOCAL_STATIC_LIBRARIES :=
LOCAL_SHARED_LIBRARIES := libcutils \
libdl \ libdl \
libstlport libstlport
LOCAL_ADDITIONAL_DEPENDENCIES :=
ifndef NDK_ROOT
include external/stlport/libstlport.mk include external/stlport/libstlport.mk
endif
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)