Clean up Android.mk
Review URL: http://webrtc-codereview.appspot.com/92014
git-svn-id: http://webrtc.googlecode.com/svn/trunk@315 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/Android.mk b/Android.mk
index 3006785..6eaceae 100644
--- a/Android.mk
+++ b/Android.mk
@@ -8,21 +8,6 @@
MY_WEBRTC_ROOT_PATH := $(call my-dir)
-# These defines will apply to all source files
-# Think again before changing it
-MY_WEBRTC_COMMON_DEFS := \
- '-DWEBRTC_TARGET_PC' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_THREAD_RR' \
- '-DWEBRTC_CLOCK_TYPE_REALTIME' \
- '-DWEBRTC_ANDROID' \
- '-DWEBRTC_ANDROID_OPENSLES'
-ifeq ($(TARGET_ARCH),arm)
-MY_WEBRTC_COMMON_DEFS += \
- '-DWEBRTC_ARM_INLINE_CALLS' \
- '-DWEBRTC_ARCH_ARM'
-endif
-
# voice
include $(MY_WEBRTC_ROOT_PATH)/src/common_audio/resampler/main/source/Android.mk
include $(MY_WEBRTC_ROOT_PATH)/src/common_audio/signal_processing_library/main/source/Android.mk
@@ -66,15 +51,103 @@
include $(MY_WEBRTC_ROOT_PATH)/libvpx.mk
# build .so
-include $(MY_WEBRTC_ROOT_PATH)/android-webrtc.mk
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_ARM_MODE := arm
+LOCAL_MODULE := libwebrtc_audio_preprocessing
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_WHOLE_STATIC_LIBRARIES := \
+ libwebrtc_spl \
+ libwebrtc_resampler \
+ libwebrtc_apm \
+ libwebrtc_apm_utility \
+ libwebrtc_vad \
+ libwebrtc_ns \
+ libwebrtc_agc \
+ libwebrtc_aec \
+ libwebrtc_aecm \
+ libwebrtc_system_wrappers
+
+LOCAL_STATIC_LIBRARIES := \
+ libprotobuf-cpp-2.3.0-lite
+
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
+ libdl \
+ libstlport
+
+LOCAL_PRELINK_MODULE := false
+
+ifndef NDK_ROOT
+include external/stlport/libstlport.mk
+endif
+include $(BUILD_SHARED_LIBRARY)
+
+###
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_ARM_MODE := arm
+LOCAL_MODULE := libwebrtc
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_WHOLE_STATIC_LIBRARIES := \
+ libwebrtc_system_wrappers \
+ libwebrtc_audio_device \
+ libwebrtc_pcm16b \
+ libwebrtc_cng \
+ libwebrtc_audio_coding \
+ libwebrtc_rtp_rtcp \
+ libwebrtc_media_file \
+ libwebrtc_udp_transport \
+ libwebrtc_utility \
+ libwebrtc_neteq \
+ libwebrtc_audio_conference_mixer \
+ libwebrtc_isac \
+ libwebrtc_ilbc \
+ libwebrtc_isacfix \
+ libwebrtc_g722 \
+ libwebrtc_g711 \
+ libwebrtc_voe_core \
+ libwebrtc_video_render \
+ libwebrtc_video_capture \
+ libwebrtc_i420 \
+ libwebrtc_video_coding \
+ libwebrtc_video_processing \
+ libwebrtc_vp8 \
+ libwebrtc_vie_core \
+ libwebrtc_vplib \
+ libwebrtc_jpeg \
+ libwebrtc_vpx
+
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
+ libdl \
+ libstlport \
+ libjpeg \
+ libGLESv2 \
+ libOpenSLES \
+ libwebrtc_audio_preprocessing
+
+LOCAL_PRELINK_MODULE := false
+
+ifndef NDK_ROOT
+include external/stlport/libstlport.mk
+endif
+include $(BUILD_SHARED_LIBRARY)
# test apps, they're for test only; all these test apps have LOCAL_MODULE_TAGS:=tests
# audio processing test apps
-# include $(MY_WEBRTC_ROOT_PATH)/src/modules/audio_processing/main/test/process_test/Android.mk
-# include $(MY_WEBRTC_ROOT_PATH)/src/modules/audio_processing/main/test/unit_test/Android.mk
+include $(MY_WEBRTC_ROOT_PATH)/src/modules/audio_processing/main/test/process_test/Android.mk
+include $(MY_WEBRTC_ROOT_PATH)/src/modules/audio_processing/main/test/unit_test/Android.mk
# voice engine test apps
-# include $(MY_WEBRTC_ROOT_PATH)/src/voice_engine/main/test/cmd_test/Android.mk
-# include $(MY_WEBRTC_ROOT_PATH)/src/voice_engine/main/test/auto_test/Android.mk
+include $(MY_WEBRTC_ROOT_PATH)/src/voice_engine/main/test/cmd_test/Android.mk
+include $(MY_WEBRTC_ROOT_PATH)/src/voice_engine/main/test/auto_test/Android.mk
# video engien test apps
-# include $(MY_WEBRTC_ROOT_PATH)/src/video_engine/main/test/AutoTest/android/Android.mk
-# include $(MY_WEBRTC_ROOT_PATH)/src/video_engine/main/test/android_test/Android.mk
+include $(MY_WEBRTC_ROOT_PATH)/src/video_engine/main/test/AutoTest/android/Android.mk
+include $(MY_WEBRTC_ROOT_PATH)/src/video_engine/main/test/android_test/Android.mk
diff --git a/android-webrtc.mk b/android-webrtc.mk
index fad2f96..735c766 100644
--- a/android-webrtc.mk
+++ b/android-webrtc.mk
@@ -6,92 +6,32 @@
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
-MY_APM_WHOLE_STATIC_LIBRARIES := \
- libwebrtc_spl \
- libwebrtc_resampler \
- libwebrtc_apm \
- libwebrtc_apm_utility \
- libwebrtc_vad \
- libwebrtc_ns \
- libwebrtc_agc \
- libwebrtc_aec \
- libwebrtc_aecm
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE := libwebrtc_audio_preprocessing
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_WHOLE_STATIC_LIBRARIES := \
- $(MY_APM_WHOLE_STATIC_LIBRARIES) \
- libwebrtc_system_wrappers \
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport
-
-LOCAL_PRELINK_MODULE := false
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
+# These defines will apply to all source files
+# Think again before changing it
+MY_WEBRTC_COMMON_DEFS := \
+ '-DWEBRTC_TARGET_PC' \
+ '-DWEBRTC_LINUX' \
+ '-DWEBRTC_THREAD_RR' \
+ '-DWEBRTC_CLOCK_TYPE_REALTIME' \
+ '-DWEBRTC_ANDROID'
+# The following macros are used by modules,
+# we might need to re-organize them
+# '-DWEBRTC_ANDROID_OPENSLES' [module audio_device]
+# '-DNETEQ_VOICEENGINE_CODECS' [module audio_coding neteq]
+# '-DWEBRTC_MODULE_UTILITY_VIDEO' [module media_file] [module utility]
+ifeq ($(TARGET_ARCH),arm)
+MY_WEBRTC_COMMON_DEFS += \
+ '-DWEBRTC_ARM_INLINE_CALLS' \
+ '-DWEBRTC_ARCH_ARM'
+# TODO: test if the code under next two MACROs works with generic GCC compilers
+ifeq ($(ARCH_ARM_HAVE_NEON),true)
+MY_WEBRTC_COMMON_DEFS += \
+ '-DWEBRTC_ANDROID_ARMV7A_NEON'
+else ifeq ($(ARCH_ARM_HAVE_ARMV7A),true)
+MY_WEBRTC_COMMON_DEFS += \
+ '-DWEBRTC_ANDROID_ARMV7A'
endif
-include $(BUILD_SHARED_LIBRARY)
-
-###
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE := libwebrtc
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_WHOLE_STATIC_LIBRARIES := \
- libwebrtc_system_wrappers \
- libwebrtc_audio_device \
- libwebrtc_pcm16b \
- libwebrtc_cng \
- libwebrtc_audio_coding \
- libwebrtc_rtp_rtcp \
- libwebrtc_media_file \
- libwebrtc_udp_transport \
- libwebrtc_utility \
- libwebrtc_neteq \
- libwebrtc_audio_conference_mixer \
- libwebrtc_isac \
- libwebrtc_ilbc \
- libwebrtc_isacfix \
- libwebrtc_g722 \
- libwebrtc_g711 \
- libwebrtc_voe_core \
- libwebrtc_video_render \
- libwebrtc_video_capture \
- libwebrtc_i420 \
- libwebrtc_video_coding \
- libwebrtc_video_processing \
- libwebrtc_vp8 \
- libwebrtc_vie_core \
- libwebrtc_vplib \
- libwebrtc_jpeg \
- libwebrtc_vpx
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libstlport \
- libjpeg \
- libGLESv2 \
- libOpenSLES \
- libwebrtc_audio_preprocessing
-
-LOCAL_PRELINK_MODULE := false
-
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
+else ifeq ($(TARGET_ARCH),x86)
+MY_WEBRTC_COMMON_DEFS += \
+ '-DWEBRTC_USE_SSE2'
endif
-include $(BUILD_SHARED_LIBRARY)
diff --git a/src/common_audio/resampler/main/source/Android.mk b/src/common_audio/resampler/main/source/Android.mk
index d09804e..1428788 100644
--- a/src/common_audio/resampler/main/source/Android.mk
+++ b/src/common_audio/resampler/main/source/Android.mk
@@ -10,6 +10,8 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_resampler
diff --git a/src/common_audio/signal_processing_library/main/source/Android.mk b/src/common_audio/signal_processing_library/main/source/Android.mk
index a0ad204..ef03193 100644
--- a/src/common_audio/signal_processing_library/main/source/Android.mk
+++ b/src/common_audio/signal_processing_library/main/source/Android.mk
@@ -10,6 +10,8 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_spl
diff --git a/src/common_audio/vad/main/source/Android.mk b/src/common_audio/vad/main/source/Android.mk
index ef8744e..1b47e4b 100644
--- a/src/common_audio/vad/main/source/Android.mk
+++ b/src/common_audio/vad/main/source/Android.mk
@@ -10,6 +10,8 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_vad
diff --git a/src/common_video/jpeg/main/source/Android.mk b/src/common_video/jpeg/main/source/Android.mk
index 9d9ec9b..11808a5 100644
--- a/src/common_video/jpeg/main/source/Android.mk
+++ b/src/common_video/jpeg/main/source/Android.mk
@@ -10,6 +10,8 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../android-webrtc.mk
+
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_jpeg
LOCAL_MODULE_TAGS := optional
diff --git a/src/common_video/vplib/main/source/Android.mk b/src/common_video/vplib/main/source/Android.mk
index b6816d2..904709e 100644
--- a/src/common_video/vplib/main/source/Android.mk
+++ b/src/common_video/vplib/main/source/Android.mk
@@ -10,6 +10,8 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../android-webrtc.mk
+
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_vplib
LOCAL_MODULE_TAGS := optional
diff --git a/src/modules/audio_coding/NetEQ/main/source/Android.mk b/src/modules/audio_coding/NetEQ/main/source/Android.mk
index d0b60d1..fbf9e4d 100644
--- a/src/modules/audio_coding/NetEQ/main/source/Android.mk
+++ b/src/modules/audio_coding/NetEQ/main/source/Android.mk
@@ -10,12 +10,14 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_neteq
LOCAL_MODULE_TAGS := optional
-LOCAL_GENERATED_SOURCES :=
-LOCAL_SRC_FILES := accelerate.c \
+LOCAL_SRC_FILES := \
+ accelerate.c \
automode.c \
bgn_update.c \
bufstats_decision.c \
@@ -50,38 +52,22 @@
webrtc_neteq.c
# Flags passed to both C and C++ files.
-MY_CFLAGS :=
-MY_CFLAGS_C :=
-MY_DEFS := '-DNO_TCMALLOC' \
- '-DNO_HEAPCHECKER' \
- '-DWEBRTC_TARGET_PC' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_THREAD_RR' \
- '-DNETEQ_VOICEENGINE_CODECS' \
- '-DWEBRTC_ANDROID' \
- '-DANDROID'
+LOCAL_CFLAGS := \
+ $(MY_WEBRTC_COMMON_DEFS) \
+ '-DNETEQ_VOICEENGINE_CODECS'
-LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../.. \
+LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/../../../codecs/CNG/main/interface \
+ $(LOCAL_PATH)/../../../../.. \
$(LOCAL_PATH)/../../../../../common_audio/signal_processing_library/main/interface
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS :=
-
-LOCAL_LDFLAGS :=
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_SHARED_LIBRARIES := libcutils \
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
libdl \
libstlport
-LOCAL_ADDITIONAL_DEPENDENCIES :=
-ifneq ($(MY_WEBRTC_NDK_BUILD),true)
-#include external/stlport/libstlport.mk
+ifndef NDK_ROOT
+include external/stlport/libstlport.mk
+endif
include $(BUILD_STATIC_LIBRARY)
-endif
\ No newline at end of file
diff --git a/src/modules/audio_coding/codecs/CNG/main/source/Android.mk b/src/modules/audio_coding/codecs/CNG/main/source/Android.mk
index fbd21c8..780f0c5 100644
--- a/src/modules/audio_coding/codecs/CNG/main/source/Android.mk
+++ b/src/modules/audio_coding/codecs/CNG/main/source/Android.mk
@@ -10,42 +10,31 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_cng
LOCAL_MODULE_TAGS := optional
LOCAL_GENERATED_SOURCES :=
-LOCAL_SRC_FILES := webrtc_cng.c \
+LOCAL_SRC_FILES := \
+ webrtc_cng.c \
cng_helpfuns.c
# Flags passed to both C and C++ files.
-MY_CFLAGS :=
-MY_CFLAGS_C :=
-MY_DEFS := '-DNO_TCMALLOC' \
- '-DNO_HEAPCHECKER' \
- '-DWEBRTC_TARGET_PC' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DANDROID'
-LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
+LOCAL_CFLAGS := \
+ $(MY_WEBRTC_COMMON_DEFS)
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../../.. \
+LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
+ $(LOCAL_PATH)/../../../../../.. \
$(LOCAL_PATH)/../../../../../../common_audio/signal_processing_library/main/interface
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS :=
-
-LOCAL_LDFLAGS :=
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_SHARED_LIBRARIES := libdl \
+LOCAL_SHARED_LIBRARIES := \
+ libdl \
libstlport
-LOCAL_ADDITIONAL_DEPENDENCIES :=
-ifneq ($(MY_WEBRTC_NDK_BUILD),true)
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_STATIC_LIBRARY)
-endif
\ No newline at end of file
diff --git a/src/modules/audio_coding/codecs/G711/main/source/Android.mk b/src/modules/audio_coding/codecs/G711/main/source/Android.mk
index 85f7129..9d4fd553 100644
--- a/src/modules/audio_coding/codecs/G711/main/source/Android.mk
+++ b/src/modules/audio_coding/codecs/G711/main/source/Android.mk
@@ -1,47 +1,40 @@
-# This file is generated by gyp; do not edit. This means you!
+# 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.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_g711
LOCAL_MODULE_TAGS := optional
LOCAL_GENERATED_SOURCES :=
-LOCAL_SRC_FILES := g711_interface.c \
+LOCAL_SRC_FILES := \
+ g711_interface.c \
g711.c
# Flags passed to both C and C++ files.
-MY_CFLAGS :=
-MY_CFLAGS_C :=
-MY_DEFS := '-DNO_TCMALLOC' \
- '-DNO_HEAPCHECKER' \
- '-DWEBRTC_TARGET_PC' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DANDROID'
-LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
+LOCAL_CFLAGS := \
+ $(MY_WEBRTC_COMMON_DEFS)
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../../.. \
- $(LOCAL_PATH)/../interface
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH)/../interface \
+ $(LOCAL_PATH)/../../../../../..
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS :=
-
-LOCAL_LDFLAGS :=
-
-LOCAL_STATIC_LIBRARIES :=
-# Duplicate the static libraries to fix circular references
-LOCAL_STATIC_LIBRARIES += $(LOCAL_STATIC_LIBRARIES)
-
-LOCAL_SHARED_LIBRARIES := libcutils \
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
libdl \
libstlport
-LOCAL_ADDITIONAL_DEPENDENCIES :=
-ifneq ($(MY_WEBRTC_NDK_BUILD),true)
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_STATIC_LIBRARY)
-endif
\ No newline at end of file
diff --git a/src/modules/audio_coding/codecs/G722/main/source/Android.mk b/src/modules/audio_coding/codecs/G722/main/source/Android.mk
index c67c2bc..59b9462 100644
--- a/src/modules/audio_coding/codecs/G722/main/source/Android.mk
+++ b/src/modules/audio_coding/codecs/G722/main/source/Android.mk
@@ -10,44 +10,31 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_g722
LOCAL_MODULE_TAGS := optional
-LOCAL_GENERATED_SOURCES :=
-LOCAL_SRC_FILES := g722_interface.c \
+LOCAL_SRC_FILES := \
+ g722_interface.c \
g722_encode.c \
g722_decode.c
# Flags passed to both C and C++ files.
-MY_CFLAGS :=
-MY_CFLAGS_C :=
-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)
+LOCAL_CFLAGS := \
+ $(MY_WEBRTC_COMMON_DEFS)
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../../.. \
- $(LOCAL_PATH)/../interface
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH)/../interface \
+ $(LOCAL_PATH)/../../../../../..
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS :=
-
-LOCAL_LDFLAGS :=
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_SHARED_LIBRARIES := libcutils \
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
libdl \
libstlport
-LOCAL_ADDITIONAL_DEPENDENCIES :=
-ifneq ($(MY_WEBRTC_NDK_BUILD),true)
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_STATIC_LIBRARY)
-endif
\ No newline at end of file
diff --git a/src/modules/audio_coding/codecs/PCM16B/main/source/Android.mk b/src/modules/audio_coding/codecs/PCM16B/main/source/Android.mk
index 49a0b7e..ec43c48 100644
--- a/src/modules/audio_coding/codecs/PCM16B/main/source/Android.mk
+++ b/src/modules/audio_coding/codecs/PCM16B/main/source/Android.mk
@@ -10,42 +10,28 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_pcm16b
LOCAL_MODULE_TAGS := optional
-LOCAL_GENERATED_SOURCES :=
LOCAL_SRC_FILES := pcm16b.c
# Flags passed to both C and C++ files.
-MY_CFLAGS :=
-MY_CFLAGS_C :=
-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)
+LOCAL_CFLAGS := \
+ $(MY_WEBRTC_COMMON_DEFS)
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../../.. \
- $(LOCAL_PATH)/../interface
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH)/../interface \
+ $(LOCAL_PATH)/../../../../../..
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS :=
-
-LOCAL_LDFLAGS :=
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_SHARED_LIBRARIES := libcutils \
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
libdl \
libstlport
-LOCAL_ADDITIONAL_DEPENDENCIES :=
-ifneq ($(MY_WEBRTC_NDK_BUILD),true)
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_STATIC_LIBRARY)
-endif
\ No newline at end of file
diff --git a/src/modules/audio_coding/codecs/iLBC/main/source/Android.mk b/src/modules/audio_coding/codecs/iLBC/main/source/Android.mk
index e38a27d..52efa6a 100644
--- a/src/modules/audio_coding/codecs/iLBC/main/source/Android.mk
+++ b/src/modules/audio_coding/codecs/iLBC/main/source/Android.mk
@@ -10,11 +10,13 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../../../android-webrtc.mk
+
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_ilbc
LOCAL_MODULE_TAGS := optional
-LOCAL_GENERATED_SOURCES :=
-LOCAL_SRC_FILES := abs_quant.c \
+LOCAL_SRC_FILES := \
+ abs_quant.c \
abs_quant_loop.c \
augmented_cb_corr.c \
bw_expand.c \
@@ -85,35 +87,20 @@
xcorr_coef.c
# Flags passed to both C and C++ files.
-MY_CFLAGS :=
-MY_CFLAGS_C :=
-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)
+LOCAL_CFLAGS := \
+ $(MY_WEBRTC_COMMON_DEFS)
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../../.. \
+LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
+ $(LOCAL_PATH)/../../../../../.. \
$(LOCAL_PATH)/../../../../../../common_audio/signal_processing_library/main/interface
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS :=
-
-LOCAL_LDFLAGS :=
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_SHARED_LIBRARIES := libcutils \
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
libdl \
libstlport
-LOCAL_ADDITIONAL_DEPENDENCIES :=
-ifneq ($(MY_WEBRTC_NDK_BUILD),true)
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_STATIC_LIBRARY)
-endif
\ No newline at end of file
diff --git a/src/modules/audio_coding/codecs/iLBC/main/test/Android.mk b/src/modules/audio_coding/codecs/iLBC/main/test/Android.mk
index 6ee80ba..6b05197 100644
--- a/src/modules/audio_coding/codecs/iLBC/main/test/Android.mk
+++ b/src/modules/audio_coding/codecs/iLBC/main/test/Android.mk
@@ -11,6 +11,8 @@
# iLBC test app
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../../../android-webrtc.mk
+
LOCAL_MODULE_TAGS := tests
LOCAL_CPP_EXTENSION := .cc
LOCAL_SRC_FILES:= \
@@ -18,25 +20,23 @@
# Flags passed to both C and C++ files.
LOCAL_CFLAGS := \
- '-DWEBRTC_TARGET_PC' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_THREAD_RR'
+ $(MY_WEBRTC_COMMON_DEFS)
-LOCAL_CPPFLAGS :=
-LOCAL_LDFLAGS :=
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/../../../../../..
-LOCAL_STATIC_LIBRARIES :=
-
LOCAL_SHARED_LIBRARIES := \
libutils \
libwebrtc
LOCAL_MODULE:= webrtc_iLBC_test
+ifdef NDK_ROOT
include $(BUILD_EXECUTABLE)
+else
+include $(BUILD_NATIVE_TEST)
+endif
# iLBC_testLib test app
include $(CLEAR_VARS)
@@ -48,22 +48,20 @@
# Flags passed to both C and C++ files.
LOCAL_CFLAGS := \
- '-DWEBRTC_TARGET_PC' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_THREAD_RR'
+ $(MY_WEBRTC_COMMON_DEFS)
-LOCAL_CPPFLAGS :=
-LOCAL_LDFLAGS :=
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/../../../../../..
-LOCAL_STATIC_LIBRARIES :=
-
LOCAL_SHARED_LIBRARIES := \
libutils \
libwebrtc
LOCAL_MODULE:= webrtc_iLBC_testLib
+ifdef NDK_ROOT
include $(BUILD_EXECUTABLE)
+else
+include $(BUILD_NATIVE_TEST)
+endif
diff --git a/src/modules/audio_coding/codecs/iSAC/fix/source/Android.mk b/src/modules/audio_coding/codecs/iSAC/fix/source/Android.mk
index 4243cb0..be36278 100644
--- a/src/modules/audio_coding/codecs/iSAC/fix/source/Android.mk
+++ b/src/modules/audio_coding/codecs/iSAC/fix/source/Android.mk
@@ -10,12 +10,14 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_isacfix
LOCAL_MODULE_TAGS := optional
-LOCAL_GENERATED_SOURCES :=
-LOCAL_SRC_FILES := arith_routines.c \
+LOCAL_SRC_FILES := \
+ arith_routines.c \
arith_routines_hist.c \
arith_routines_logist.c \
bandwidth_estimator.c \
@@ -41,35 +43,20 @@
transform.c
# Flags passed to both C and C++ files.
-MY_CFLAGS :=
-MY_CFLAGS_C :=
-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)
+LOCAL_CFLAGS := \
+ $(MY_WEBRTC_COMMON_DEFS)
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../../.. \
+LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
+ $(LOCAL_PATH)/../../../../../.. \
$(LOCAL_PATH)/../../../../../../common_audio/signal_processing_library/main/interface
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS :=
-
-LOCAL_LDFLAGS :=
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_SHARED_LIBRARIES := libcutils \
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
libdl \
libstlport
-LOCAL_ADDITIONAL_DEPENDENCIES :=
-ifneq ($(MY_WEBRTC_NDK_BUILD),true)
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_STATIC_LIBRARY)
-endif
\ No newline at end of file
diff --git a/src/modules/audio_coding/codecs/iSAC/main/source/Android.mk b/src/modules/audio_coding/codecs/iSAC/main/source/Android.mk
index aee5e50..6abeae0 100644
--- a/src/modules/audio_coding/codecs/iSAC/main/source/Android.mk
+++ b/src/modules/audio_coding/codecs/iSAC/main/source/Android.mk
@@ -10,12 +10,14 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_isac
LOCAL_MODULE_TAGS := optional
-LOCAL_GENERATED_SOURCES :=
-LOCAL_SRC_FILES := arith_routines.c \
+LOCAL_SRC_FILES := \
+ arith_routines.c \
arith_routines_hist.c \
arith_routines_logist.c \
bandwidth_estimator.c \
@@ -45,35 +47,20 @@
transform.c
# Flags passed to both C and C++ files.
-MY_CFLAGS :=
-MY_CFLAGS_C :=
-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)
+LOCAL_CFLAGS := \
+ $(MY_WEBRTC_COMMON_DEFS)
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../../.. \
+LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
+ $(LOCAL_PATH)/../../../../../.. \
$(LOCAL_PATH)/../../../../../../common_audio/signal_processing_library/main/interface
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS :=
-
-LOCAL_LDFLAGS :=
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_SHARED_LIBRARIES := libcutils \
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
libdl \
libstlport
-LOCAL_ADDITIONAL_DEPENDENCIES :=
-ifneq ($(MY_WEBRTC_NDK_BUILD),true)
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_STATIC_LIBRARY)
-endif
\ No newline at end of file
diff --git a/src/modules/audio_coding/main/source/Android.mk b/src/modules/audio_coding/main/source/Android.mk
index 5074335..8e1007f 100644
--- a/src/modules/audio_coding/main/source/Android.mk
+++ b/src/modules/audio_coding/main/source/Android.mk
@@ -10,30 +10,23 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_audio_coding
LOCAL_MODULE_TAGS := optional
LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
-LOCAL_SRC_FILES := acm_amr.cc \
- acm_amrwb.cc \
+LOCAL_SRC_FILES := \
acm_cng.cc \
acm_codec_database.cc \
acm_dtmf_detection.cc \
acm_dtmf_playout.cc \
acm_g722.cc \
- acm_g7221.cc \
- acm_g7221c.cc \
- acm_g729.cc \
- acm_g7291.cc \
acm_generic_codec.cc \
- acm_gsmfr.cc \
acm_ilbc.cc \
acm_isac.cc \
acm_neteq.cc \
- acm_opus.cc \
- acm_speex.cc \
acm_pcm16b.cc \
acm_pcma.cc \
acm_pcmu.cc \
@@ -43,22 +36,11 @@
audio_coding_module_impl.cc
# Flags passed to both C and C++ files.
-MY_CFLAGS :=
-MY_CFLAGS_C :=
-MY_DEFS := '-DNO_TCMALLOC' \
- '-DNO_HEAPCHECKER' \
- '-DWEBRTC_TARGET_PC' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_THREAD_RR' \
- '-DWEBRTC_ANDROID' \
- '-DANDROID'
+LOCAL_CFLAGS := \
+ $(MY_WEBRTC_COMMON_DEFS)
-LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../.. \
+LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../../../interface \
$(LOCAL_PATH)/../../codecs/CNG/main/interface \
$(LOCAL_PATH)/../../codecs/G711/main/interface \
$(LOCAL_PATH)/../../codecs/G722/main/interface \
@@ -67,24 +49,19 @@
$(LOCAL_PATH)/../../codecs/iSAC/fix/interface \
$(LOCAL_PATH)/../../codecs/PCM16B/main/interface \
$(LOCAL_PATH)/../../NetEQ/main/interface \
+ $(LOCAL_PATH)/../../../.. \
+ $(LOCAL_PATH)/../../../interface \
$(LOCAL_PATH)/../../../../common_audio/resampler/main/interface \
$(LOCAL_PATH)/../../../../common_audio/signal_processing_library/main/interface \
$(LOCAL_PATH)/../../../../common_audio/vad/main/interface \
$(LOCAL_PATH)/../../../../system_wrappers/interface
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS :=
-
-LOCAL_LDFLAGS :=
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_SHARED_LIBRARIES := libcutils \
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
libdl \
libstlport
-LOCAL_ADDITIONAL_DEPENDENCIES :=
-ifneq ($(MY_WEBRTC_NDK_BUILD),true)
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_STATIC_LIBRARY)
-endif
\ No newline at end of file
diff --git a/src/modules/audio_conference_mixer/source/Android.mk b/src/modules/audio_conference_mixer/source/Android.mk
index 0e372c6..da56e8b 100644
--- a/src/modules/audio_conference_mixer/source/Android.mk
+++ b/src/modules/audio_conference_mixer/source/Android.mk
@@ -10,6 +10,8 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../android-webrtc.mk
+
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_audio_conference_mixer
LOCAL_MODULE_TAGS := optional
diff --git a/src/modules/audio_device/main/source/Android.mk b/src/modules/audio_device/main/source/Android.mk
index 99bbef5..42ae10d 100644
--- a/src/modules/audio_device/main/source/Android.mk
+++ b/src/modules/audio_device/main/source/Android.mk
@@ -10,13 +10,15 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_audio_device
LOCAL_MODULE_TAGS := optional
LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
-LOCAL_SRC_FILES := audio_device_buffer.cc \
+LOCAL_SRC_FILES := \
+ audio_device_buffer.cc \
audio_device_generic.cc \
audio_device_utility.cc \
audio_device_impl.cc \
@@ -26,46 +28,30 @@
Dummy/audio_device_dummy.cc
# Flags passed to both C and C++ files.
-MY_CFLAGS :=
-MY_CFLAGS_C :=
-MY_DEFS := '-DNO_TCMALLOC' \
- '-DNO_HEAPCHECKER' \
- '-DWEBRTC_TARGET_PC' \
- '-DWEBRTC_THREAD_RR' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID_OPENSLES' \
- '-DWEBRTC_ANDROID'
+LOCAL_CFLAGS := \
+ $(MY_WEBRTC_COMMON_DEFS) \
+ '-DWEBRTC_ANDROID_OPENSLES'
-LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
-
-# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES := \
- $(JNI_H_INCLUDE) \
- $(LOCAL_PATH)/../../../.. \
- $(LOCAL_PATH)/. \
- $(LOCAL_PATH)/../../../interface \
- $(LOCAL_PATH)/../interface \
+ $(LOCAL_PATH) \
$(LOCAL_PATH)/Android \
$(LOCAL_PATH)/Dummy \
$(LOCAL_PATH)/Linux \
+ $(LOCAL_PATH)/../interface \
+ $(LOCAL_PATH)/../../../.. \
+ $(LOCAL_PATH)/../../../interface \
$(LOCAL_PATH)/../../../../common_audio/resampler/main/interface \
$(LOCAL_PATH)/../../../../common_audio/signal_processing_library/main/interface \
$(LOCAL_PATH)/../../../../system_wrappers/interface \
system/media/wilhelm/include
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS :=
-
-LOCAL_LDFLAGS :=
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_SHARED_LIBRARIES := libcutils \
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
libdl \
libstlport \
libOpenSLES
-LOCAL_ADDITIONAL_DEPENDENCIES :=
-
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_STATIC_LIBRARY)
diff --git a/src/modules/audio_processing/aec/main/source/Android.mk b/src/modules/audio_processing/aec/main/source/Android.mk
index f041956..86df675 100644
--- a/src/modules/audio_processing/aec/main/source/Android.mk
+++ b/src/modules/audio_processing/aec/main/source/Android.mk
@@ -10,6 +10,8 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../../android-webrtc.mk
+
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_aec
LOCAL_MODULE_TAGS := optional
@@ -17,23 +19,15 @@
echo_cancellation.c \
resampler.c \
aec_core.c \
- aec_rdft.c
+ aec_rdft.c \
+ aec_core_sse2.c \
+ aec_rdft_sse2.c
+
# Flags passed to both C and C++ files.
LOCAL_CFLAGS := \
$(MY_WEBRTC_COMMON_DEFS)
-ifeq ($(TARGET_ARCH),x86)
-LOCAL_SRC_FILES += \
- aec_core_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
-
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/../../../utility \
diff --git a/src/modules/audio_processing/aecm/main/source/Android.mk b/src/modules/audio_processing/aecm/main/source/Android.mk
index 41a013a..c0d2478 100644
--- a/src/modules/audio_processing/aecm/main/source/Android.mk
+++ b/src/modules/audio_processing/aecm/main/source/Android.mk
@@ -10,19 +10,21 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../../android-webrtc.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 \
+ aecm_delay_estimator.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)/../interface \
$(LOCAL_PATH)/../../../utility \
diff --git a/src/modules/audio_processing/agc/main/source/Android.mk b/src/modules/audio_processing/agc/main/source/Android.mk
index 7002580..623fc9f 100644
--- a/src/modules/audio_processing/agc/main/source/Android.mk
+++ b/src/modules/audio_processing/agc/main/source/Android.mk
@@ -1,9 +1,17 @@
-# This file is generated by gyp; do not edit. This means you!
+# 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.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_agc
@@ -16,7 +24,6 @@
LOCAL_CFLAGS := \
$(MY_WEBRTC_COMMON_DEFS)
-# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/../../../../.. \
diff --git a/src/modules/audio_processing/main/source/Android.mk b/src/modules/audio_processing/main/source/Android.mk
index d8215fb..2ba4731 100644
--- a/src/modules/audio_processing/main/source/Android.mk
+++ b/src/modules/audio_processing/main/source/Android.mk
@@ -10,6 +10,8 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE := libwebrtc_apm
LOCAL_MODULE_TAGS := optional
diff --git a/src/modules/audio_processing/main/test/process_test/Android.mk b/src/modules/audio_processing/main/test/process_test/Android.mk
index 7dc7730..bc27813 100644
--- a/src/modules/audio_processing/main/test/process_test/Android.mk
+++ b/src/modules/audio_processing/main/test/process_test/Android.mk
@@ -12,6 +12,8 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../../android-webrtc.mk
+
LOCAL_MODULE_TAGS := tests
LOCAL_CPP_EXTENSION := .cc
LOCAL_SRC_FILES:= \
@@ -26,7 +28,7 @@
$(LOCAL_PATH)/../../../../interface \
$(LOCAL_PATH)/../../../../.. \
$(LOCAL_PATH)/../../../../../system_wrappers/interface \
- external/gtest/include \
+ external/gtest/include
LOCAL_STATIC_LIBRARIES := \
libgtest
@@ -34,11 +36,13 @@
LOCAL_SHARED_LIBRARIES := \
libutils \
libstlport \
- libwebrtc_audio_preprocessing
+ libwebrtc_audio_preprocessing
LOCAL_MODULE:= webrtc_apm_process_test
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
+ifdef NDK_ROOT
include $(BUILD_EXECUTABLE)
+else
+include external/stlport/libstlport.mk
+include $(BUILD_NATIVE_TEST)
+endif
diff --git a/src/modules/audio_processing/main/test/unit_test/Android.mk b/src/modules/audio_processing/main/test/unit_test/Android.mk
index 92c7df6..65bd6ac 100644
--- a/src/modules/audio_processing/main/test/unit_test/Android.mk
+++ b/src/modules/audio_processing/main/test/unit_test/Android.mk
@@ -12,6 +12,8 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../../android-webrtc.mk
+
LOCAL_MODULE_TAGS := tests
LOCAL_CPP_EXTENSION := .cc
LOCAL_SRC_FILES:= \
@@ -20,7 +22,8 @@
# Flags passed to both C and C++ files.
LOCAL_CFLAGS := \
- $(MY_WEBRTC_COMMON_DEFS)
+ $(MY_WEBRTC_COMMON_DEFS) \
+ '-DWEBRTC_APM_UNIT_TEST_FIXED_PROFILE'
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../../interface \
@@ -41,7 +44,9 @@
LOCAL_MODULE:= webrtc_apm_unit_test
-ifndef NDK_ROOT
-include external/stlport/libstlport.mk
-endif
+ifdef NDK_ROOT
include $(BUILD_EXECUTABLE)
+else
+include external/stlport/libstlport.mk
+include $(BUILD_NATIVE_TEST)
+endif
diff --git a/src/modules/audio_processing/ns/main/source/Android.mk b/src/modules/audio_processing/ns/main/source/Android.mk
index b883420..4cbdfdf 100644
--- a/src/modules/audio_processing/ns/main/source/Android.mk
+++ b/src/modules/audio_processing/ns/main/source/Android.mk
@@ -1,9 +1,17 @@
-# This file is generated by gyp; do not edit. This means you!
+# 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.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../../android-webrtc.mk
+
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_ns
LOCAL_MODULE_TAGS := optional
@@ -19,7 +27,6 @@
LOCAL_CFLAGS := \
$(MY_WEBRTC_COMMON_DEFS)
-# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/../../../utility \
diff --git a/src/modules/audio_processing/utility/Android.mk b/src/modules/audio_processing/utility/Android.mk
index 9892c95..dc967c2 100644
--- a/src/modules/audio_processing/utility/Android.mk
+++ b/src/modules/audio_processing/utility/Android.mk
@@ -10,6 +10,8 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_apm_utility
diff --git a/src/modules/media_file/source/Android.mk b/src/modules/media_file/source/Android.mk
index 3adcc59..2c408c8 100644
--- a/src/modules/media_file/source/Android.mk
+++ b/src/modules/media_file/source/Android.mk
@@ -1,52 +1,46 @@
-# This file is generated by gyp; do not edit. This means you!
+# 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.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_media_file
LOCAL_MODULE_TAGS := optional
LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
-LOCAL_SRC_FILES := avi_file.cc \
+LOCAL_SRC_FILES := \
+ avi_file.cc \
media_file_impl.cc \
media_file_utility.cc
# Flags passed to both C and C++ files.
-MY_CFLAGS :=
-MY_CFLAGS_C :=
-MY_DEFS := '-DNO_TCMALLOC' \
- '-DNO_HEAPCHECKER' \
- '-DWEBRTC_TARGET_PC' \
- '-DWEBRTC_LINUX' \
- '-DWEBRTC_THREAD_RR' \
- '-DWEBRTC_MODULE_UTILITY_VIDEO' \
- '-DWEBRTC_ANDROID' \
- '-DANDROID'
+LOCAL_CFLAGS := \
+ $(MY_WEBRTC_COMMON_DEFS) \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO'
-LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
-
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../.. \
+LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
+ $(LOCAL_PATH)/../../.. \
$(LOCAL_PATH)/../../interface \
$(LOCAL_PATH)/../../utility/interface \
$(LOCAL_PATH)/../../audio_coding/main/interface \
$(LOCAL_PATH)/../../../system_wrappers/interface
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS :=
-
-LOCAL_LDFLAGS :=
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_SHARED_LIBRARIES := libcutils \
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
libdl \
libstlport
-LOCAL_ADDITIONAL_DEPENDENCIES :=
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_STATIC_LIBRARY)
diff --git a/src/modules/rtp_rtcp/source/Android.mk b/src/modules/rtp_rtcp/source/Android.mk
index d2141fe..540c3fa 100644
--- a/src/modules/rtp_rtcp/source/Android.mk
+++ b/src/modules/rtp_rtcp/source/Android.mk
@@ -10,12 +10,15 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../android-webrtc.mk
+
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_rtp_rtcp
LOCAL_MODULE_TAGS := optional
LOCAL_CPP_EXTENSION := .cc
LOCAL_GENERATED_SOURCES :=
-LOCAL_SRC_FILES := bitrate.cc \
+LOCAL_SRC_FILES := \
+ bitrate.cc \
rtp_rtcp_impl.cc \
rtcp_receiver.cc \
rtcp_receiver_help.cc \
@@ -41,34 +44,21 @@
rtp_format_vp8.cc
# Flags passed to both C and C++ files.
-MY_CFLAGS :=
-MY_CFLAGS_C :=
-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)
+LOCAL_CFLAGS := \
+ $(MY_WEBRTC_COMMON_DEFS)
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../.. \
+LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
+ $(LOCAL_PATH)/../../.. \
$(LOCAL_PATH)/../../interface \
$(LOCAL_PATH)/../../../system_wrappers/interface
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS :=
-
-LOCAL_LDFLAGS :=
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_SHARED_LIBRARIES := libcutils \
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
libdl \
libstlport
-LOCAL_ADDITIONAL_DEPENDENCIES :=
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_STATIC_LIBRARY)
diff --git a/src/modules/udp_transport/source/Android.mk b/src/modules/udp_transport/source/Android.mk
index c29fd81..f3cb0e8 100644
--- a/src/modules/udp_transport/source/Android.mk
+++ b/src/modules/udp_transport/source/Android.mk
@@ -10,47 +10,36 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_udp_transport
LOCAL_MODULE_TAGS := optional
LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
-LOCAL_SRC_FILES := udp_transport_impl.cc \
+LOCAL_SRC_FILES := \
+ udp_transport_impl.cc \
udp_socket_wrapper.cc \
udp_socket_manager_wrapper.cc \
udp_socket_manager_posix.cc \
udp_socket_posix.cc
# Flags passed to both C and C++ files.
-MY_CFLAGS :=
-MY_CFLAGS_C :=
-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)
+LOCAL_CFLAGS := \
+ $(MY_WEBRTC_COMMON_DEFS)
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../.. \
+LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
+ $(LOCAL_PATH)/../../.. \
$(LOCAL_PATH)/../../interface \
$(LOCAL_PATH)/../../../system_wrappers/interface
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS :=
-
-LOCAL_LDFLAGS :=
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_SHARED_LIBRARIES := libcutils \
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
libdl \
libstlport
-LOCAL_ADDITIONAL_DEPENDENCIES :=
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_STATIC_LIBRARY)
diff --git a/src/modules/utility/source/Android.mk b/src/modules/utility/source/Android.mk
index c7fe62b..7ee4128 100644
--- a/src/modules/utility/source/Android.mk
+++ b/src/modules/utility/source/Android.mk
@@ -1,14 +1,21 @@
-# This file is generated by gyp; do not edit. This means you!
+# 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.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../android-webrtc.mk
+
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_utility
LOCAL_MODULE_TAGS := optional
LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
LOCAL_SRC_FILES := coder.cc \
file_player_impl.cc \
file_recorder_impl.cc \
@@ -19,40 +26,30 @@
video_frames_queue.cc
# Flags passed to both C and C++ files.
-MY_CFLAGS :=
-MY_CFLAGS_C :=
-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)
+LOCAL_CFLAGS := \
+ $(MY_WEBRTC_COMMON_DEFS) \
+ '-DWEBRTC_MODULE_UTILITY_VIDEO'
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../.. \
+LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/../../interface \
- $(LOCAL_PATH)/../../../common_video/vplib/main/interface \
+ $(LOCAL_PATH)/../../audio_coding/main/interface \
$(LOCAL_PATH)/../../media_file/interface \
$(LOCAL_PATH)/../../video_coding/main/interface \
- $(LOCAL_PATH)/../../audio_coding/main/interface \
$(LOCAL_PATH)/../../video_coding/codecs/interface \
+ $(LOCAL_PATH)/../../.. \
+ $(LOCAL_PATH)/../../../common_video/vplib/main/interface \
$(LOCAL_PATH)/../../../common_audio/resampler/main/interface \
$(LOCAL_PATH)/../../../system_wrappers/interface
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS :=
-LOCAL_LDFLAGS :=
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_SHARED_LIBRARIES := libcutils \
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
libdl \
libstlport
-LOCAL_ADDITIONAL_DEPENDENCIES :=
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_STATIC_LIBRARY)
diff --git a/src/modules/video_capture/main/source/Android.mk b/src/modules/video_capture/main/source/Android.mk
index 178984f..72711df 100644
--- a/src/modules/video_capture/main/source/Android.mk
+++ b/src/modules/video_capture/main/source/Android.mk
@@ -10,52 +10,41 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_video_capture
LOCAL_MODULE_TAGS := optional
LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
-LOCAL_SRC_FILES := video_capture_impl.cc \
+LOCAL_SRC_FILES := \
+ video_capture_impl.cc \
vplib_conversions.cc \
device_info_impl.cc \
Android/video_capture_android.cc \
Android/device_info_android.cc
# Flags passed to both C and C++ files.
-MY_CFLAGS :=
-MY_CFLAGS_C :=
-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)
+LOCAL_CFLAGS := \
+ $(MY_WEBRTC_COMMON_DEFS)
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../.. \
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH)/Android \
$(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/../source \
$(LOCAL_PATH)/../../../interface \
- $(LOCAL_PATH)/../../../../common_video/vplib/main/interface \
- $(LOCAL_PATH)/../../../../system_wrappers/interface \
$(LOCAL_PATH)/../../../utility/interface \
$(LOCAL_PATH)/../../../audio_coding/main/interface \
- $(LOCAL_PATH)/Android
+ $(LOCAL_PATH)/../../../.. \
+ $(LOCAL_PATH)/../../../../common_video/vplib/main/interface \
+ $(LOCAL_PATH)/../../../../system_wrappers/interface
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS :=
-
-LOCAL_LDFLAGS :=
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_SHARED_LIBRARIES := libcutils \
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
libdl \
libstlport
-LOCAL_ADDITIONAL_DEPENDENCIES :=
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_STATIC_LIBRARY)
diff --git a/src/modules/video_coding/codecs/i420/main/source/Android.mk b/src/modules/video_coding/codecs/i420/main/source/Android.mk
index d1a08f3..d73e77d 100644
--- a/src/modules/video_coding/codecs/i420/main/source/Android.mk
+++ b/src/modules/video_coding/codecs/i420/main/source/Android.mk
@@ -10,43 +10,32 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../../../android-webrtc.mk
+
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_i420
LOCAL_MODULE_TAGS := optional
LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
LOCAL_SRC_FILES := i420.cc
# Flags passed to both C and C++ files.
-MY_CFLAGS :=
-MY_CFLAGS_C :=
-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)
+LOCAL_CFLAGS := \
+ $(MY_WEBRTC_COMMON_DEFS)
# 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_video/interface \
$(LOCAL_PATH)/../../../../../../system_wrappers/interface
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS :=
-
-LOCAL_LDFLAGS :=
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_SHARED_LIBRARIES := libcutils \
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
libdl \
libstlport
-LOCAL_ADDITIONAL_DEPENDENCIES :=
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_STATIC_LIBRARY)
diff --git a/src/modules/video_coding/codecs/vp8/main/source/Android.mk b/src/modules/video_coding/codecs/vp8/main/source/Android.mk
index e036e9c..380047b 100644
--- a/src/modules/video_coding/codecs/vp8/main/source/Android.mk
+++ b/src/modules/video_coding/codecs/vp8/main/source/Android.mk
@@ -10,45 +10,33 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../../../android-webrtc.mk
+
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_vp8
LOCAL_MODULE_TAGS := optional
LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
LOCAL_SRC_FILES := vp8.cc
# Flags passed to both C and C++ files.
-MY_CFLAGS :=
-MY_CFLAGS_C :=
-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)
+LOCAL_CFLAGS := \
+ $(MY_WEBRTC_COMMON_DEFS)
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../../.. \
+LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/../../../interface \
- $(LOCAL_PATH)/../../../../../../modules/interface \
+ $(LOCAL_PATH)/../../../../../.. \
$(LOCAL_PATH)/../../../../../../common_video/interface \
+ $(LOCAL_PATH)/../../../../../../modules/interface \
$(LOCAL_PATH)/../../../../../../system_wrappers/interface \
external/libvpx
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS :=
-
-LOCAL_LDFLAGS :=
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_SHARED_LIBRARIES := libcutils \
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
libdl \
libstlport
-LOCAL_ADDITIONAL_DEPENDENCIES :=
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_STATIC_LIBRARY)
diff --git a/src/modules/video_coding/main/source/Android.mk b/src/modules/video_coding/main/source/Android.mk
index 81f2cb0..98d8708 100644
--- a/src/modules/video_coding/main/source/Android.mk
+++ b/src/modules/video_coding/main/source/Android.mk
@@ -10,13 +10,15 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_video_coding
LOCAL_MODULE_TAGS := optional
LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
-LOCAL_SRC_FILES := codec_database.cc \
+LOCAL_SRC_FILES := \
+ codec_database.cc \
codec_timer.cc \
content_metrics_processing.cc \
encoded_frame.cc \
@@ -42,39 +44,26 @@
video_coding_impl.cc
# Flags passed to both C and C++ files.
-MY_CFLAGS :=
-MY_CFLAGS_C :=
-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)
+LOCAL_CFLAGS := \
+ $(MY_WEBRTC_COMMON_DEFS)
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../.. \
+LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
- $(LOCAL_PATH)/../../../interface \
$(LOCAL_PATH)/../../codecs/interface \
$(LOCAL_PATH)/../../codecs/i420/main/interface \
$(LOCAL_PATH)/../../codecs/vp8/main/interface \
+ $(LOCAL_PATH)/../../../interface \
+ $(LOCAL_PATH)/../../../.. \
$(LOCAL_PATH)/../../../../common_video/vplib/main/interface \
$(LOCAL_PATH)/../../../../common_video/interface \
$(LOCAL_PATH)/../../../../system_wrappers/interface
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS :=
-
-LOCAL_LDFLAGS :=
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_SHARED_LIBRARIES := libcutils \
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
libdl \
libstlport
-LOCAL_ADDITIONAL_DEPENDENCIES :=
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_STATIC_LIBRARY)
diff --git a/src/modules/video_processing/main/source/Android.mk b/src/modules/video_processing/main/source/Android.mk
index 07779d2..b228b8e 100644
--- a/src/modules/video_processing/main/source/Android.mk
+++ b/src/modules/video_processing/main/source/Android.mk
@@ -10,13 +10,15 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_video_processing
LOCAL_MODULE_TAGS := optional
LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
-LOCAL_SRC_FILES := video_processing_impl.cc \
+LOCAL_SRC_FILES := \
+ video_processing_impl.cc \
brightness_detection.cc \
color_enhancement.cc \
content_analysis.cc \
@@ -27,38 +29,25 @@
video_decimator.cc
# Flags passed to both C and C++ files.
-MY_CFLAGS :=
-MY_CFLAGS_C :=
-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)
+LOCAL_CFLAGS := \
+ $(MY_WEBRTC_COMMON_DEFS)
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../.. \
+LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
+ $(LOCAL_PATH)/../../../.. \
+ $(LOCAL_PATH)/../../../interface \
+ $(LOCAL_PATH)/../../../audio_coding/main/interface \
+ $(LOCAL_PATH)/../../../utility/interface \
$(LOCAL_PATH)/../../../../common_audio/signal_processing_library/main/interface \
$(LOCAL_PATH)/../../../../common_video/vplib/main/interface \
- $(LOCAL_PATH)/../../../../system_wrappers/interface \
- $(LOCAL_PATH)/../../../utility/interface \
- $(LOCAL_PATH)/../../../interface \
- $(LOCAL_PATH)/../../../audio_coding/main/interface
+ $(LOCAL_PATH)/../../../../system_wrappers/interface
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS :=
-
-LOCAL_LDFLAGS :=
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_SHARED_LIBRARIES := libcutils \
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
libdl \
libstlport
-LOCAL_ADDITIONAL_DEPENDENCIES :=
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_STATIC_LIBRARY)
diff --git a/src/modules/video_render/main/source/Android.mk b/src/modules/video_render/main/source/Android.mk
index 2f8e543..4c7c9bd 100644
--- a/src/modules/video_render/main/source/Android.mk
+++ b/src/modules/video_render/main/source/Android.mk
@@ -10,6 +10,8 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../android-webrtc.mk
+
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_MODULE := libwebrtc_video_render
LOCAL_MODULE_TAGS := optional
@@ -39,7 +41,6 @@
$(LOCAL_PATH)/../../../../common_video/vplib/main/interface \
$(LOCAL_PATH)/../../../../system_wrappers/interface
-# TODO(leozwang) organize shared library in a better way
LOCAL_SHARED_LIBRARIES := \
libcutils \
libdl \
diff --git a/src/system_wrappers/source/Android.mk b/src/system_wrappers/source/Android.mk
index 1dbef6b..5fff510 100644
--- a/src/system_wrappers/source/Android.mk
+++ b/src/system_wrappers/source/Android.mk
@@ -10,6 +10,8 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE := libwebrtc_system_wrappers
LOCAL_MODULE_TAGS := optional
diff --git a/src/video_engine/main/source/Android.mk b/src/video_engine/main/source/Android.mk
index 0243b79..b6a4e95 100644
--- a/src/video_engine/main/source/Android.mk
+++ b/src/video_engine/main/source/Android.mk
@@ -10,12 +10,14 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE := libwebrtc_vie_core
LOCAL_MODULE_TAGS := optional
LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
-LOCAL_SRC_FILES := vie_base_impl.cc \
+LOCAL_SRC_FILES := \
+ vie_base_impl.cc \
vie_capture_impl.cc \
vie_codec_impl.cc \
vie_encryption_impl.cc \
@@ -46,20 +48,12 @@
vie_sync_module.cc
# Flags passed to both C and C++ files.
-MY_CFLAGS :=
-MY_CFLAGS_C :=
-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)
+LOCAL_CFLAGS := \
+ $(MY_WEBRTC_COMMON_DEFS)
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../.. \
+LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
+ $(LOCAL_PATH)/../../.. \
$(LOCAL_PATH)/../../../common_video/interface \
$(LOCAL_PATH)/../../../common_video/jpeg/main/interface \
$(LOCAL_PATH)/../../../common_video/vplib/main/interface \
@@ -78,17 +72,10 @@
$(LOCAL_PATH)/../../../system_wrappers/interface \
$(LOCAL_PATH)/../../../voice_engine/main/interface
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS :=
-
-LOCAL_LDFLAGS :=
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_SHARED_LIBRARIES := libcutils \
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
libdl \
libstlport
-LOCAL_ADDITIONAL_DEPENDENCIES :=
ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
LOCAL_LDLIBS += -ldl -lpthread
@@ -98,5 +85,7 @@
LOCAL_SHARED_LIBRARIES += libdl
endif
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_STATIC_LIBRARY)
diff --git a/src/video_engine/main/test/AutoTest/android/jni/Android.mk b/src/video_engine/main/test/AutoTest/android/jni/Android.mk
index c5d0123..a834e2c 100644
--- a/src/video_engine/main/test/AutoTest/android/jni/Android.mk
+++ b/src/video_engine/main/test/AutoTest/android/jni/Android.mk
@@ -15,7 +15,7 @@
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
-LOCAL_MODULE := libwebrtc-video-autotest-jni
+LOCAL_MODULE := libwebrtc-video-autotest-jni
LOCAL_CPP_EXTENSION := .cc
LOCAL_SRC_FILES := \
vie_autotest_jni.cc \
@@ -37,12 +37,9 @@
../../source/tb_interfaces.cc \
../../source/tb_video_channel.cc
-LOCAL_CPPFLAGS :=
-LOCAL_LDFLAGS :=
-LOCAL_CFLAGS += \
+LOCAL_CFLAGS := \
'-DWEBRTC_TARGET_PC' \
- '-DWEBRTC_ANDROID' \
- '-DANDROID'
+ '-DWEBRTC_ANDROID'
LOCAL_C_INCLUDES := \
external/gtest/include \
@@ -59,9 +56,7 @@
$(LOCAL_PATH)/../../../../../../voice_engine/main/interface \
$(LOCAL_PATH)/../../../../../../system_wrappers/interface
-
LOCAL_PRELINK_MODULE := false
-LOCAL_STATIC_LIBRARIES :=
LOCAL_SHARED_LIBRARIES := \
libutils \
@@ -73,5 +68,7 @@
# the following line is for NDK build
LOCAL_LDLIBS := $(LIBS_PATH)/VideoEngine_android_gcc.a -llog -lgcc
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_SHARED_LIBRARY)
diff --git a/src/video_engine/main/test/AutoTest/source/Android.mk b/src/video_engine/main/test/AutoTest/source/Android.mk
index 88dab3e..8474c24 100644
--- a/src/video_engine/main/test/AutoTest/source/Android.mk
+++ b/src/video_engine/main/test/AutoTest/source/Android.mk
@@ -12,6 +12,8 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../../android-webrtc.mk
+
LOCAL_MODULE_TAGS := tests
LOCAL_CPP_EXTENSION := .cc
LOCAL_SRC_FILES:= \
@@ -31,10 +33,8 @@
# Flags passed to both C and C++ files.
LOCAL_CFLAGS := \
'-DWEBRTC_TARGET_PC' \
- '-DWEBRTC_ANDROID' \
- '-DANDROID'
-LOCAL_CPPFLAGS :=
-LOCAL_LDFLAGS :=
+ '-DWEBRTC_ANDROID'
+
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/../../../../.. \
@@ -49,8 +49,6 @@
$(LOCAL_PATH)/../../../../../common_video/vplib/main/interface \
$(LOCAL_PATH)/../../../../../voice_engine/main/interface
-LOCAL_STATIC_LIBRARIES :=
-
LOCAL_SHARED_LIBRARIES := \
libutils \
libstlport \
@@ -58,5 +56,7 @@
LOCAL_MODULE:= webrtc_video_test
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_EXECUTABLE)
diff --git a/src/video_engine/main/test/android_test/jni/Android.mk b/src/video_engine/main/test/android_test/jni/Android.mk
index 2ca4ad9..707828b 100644
--- a/src/video_engine/main/test/android_test/jni/Android.mk
+++ b/src/video_engine/main/test/android_test/jni/Android.mk
@@ -14,15 +14,12 @@
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
-LOCAL_MODULE := libwebrtc-video-demo-jni
+LOCAL_MODULE := libwebrtc-video-demo-jni
LOCAL_CPP_EXTENSION := .cc
LOCAL_SRC_FILES := vie_android_java_api.cc
-LOCAL_CPPFLAGS :=
-LOCAL_LDFLAGS :=
-LOCAL_CFLAGS += \
+LOCAL_CFLAGS := \
'-DWEBRTC_TARGET_PC' \
- '-DWEBRTC_ANDROID' \
- '-DANDROID'
+ '-DWEBRTC_ANDROID'
LOCAL_C_INCLUDES := \
external/gtest/include \
@@ -31,7 +28,6 @@
$(LOCAL_PATH)/../../../../../voice_engine/main/interface
LOCAL_PRELINK_MODULE := false
-LOCAL_STATIC_LIBRARIES :=
LOCAL_SHARED_LIBRARIES := \
libutils \
@@ -39,7 +35,7 @@
libandroid \
libwebrtc \
libGLESv2
-LOCAL_LDLIBS := $(LIBS_PATH)/VideoEngine_android_gcc.a -llog -lgcc
+LOCAL_LDLIBS := $(LIBS_PATH)/VideoEngine_android_gcc.a -llog -lgcc
include $(BUILD_SHARED_LIBRARY)
diff --git a/src/voice_engine/main/source/Android.mk b/src/voice_engine/main/source/Android.mk
index ad2da36..c7bd009 100644
--- a/src/voice_engine/main/source/Android.mk
+++ b/src/voice_engine/main/source/Android.mk
@@ -10,12 +10,14 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../android-webrtc.mk
+
LOCAL_ARM_MODE := arm
LOCAL_MODULE := libwebrtc_voe_core
LOCAL_MODULE_TAGS := optional
LOCAL_CPP_EXTENSION := .cc
-LOCAL_GENERATED_SOURCES :=
-LOCAL_SRC_FILES := audio_frame_operations.cc \
+LOCAL_SRC_FILES := \
+ audio_frame_operations.cc \
channel.cc \
channel_manager.cc \
channel_manager_base.cc \
@@ -46,24 +48,16 @@
voice_engine_impl.cc
# Flags passed to both C and C++ files.
-MY_CFLAGS :=
-MY_CFLAGS_C :=
-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)
+LOCAL_CFLAGS := \
+ $(MY_WEBRTC_COMMON_DEFS)
-# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../.. \
+LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \
+ $(LOCAL_PATH)/../../.. \
$(LOCAL_PATH)/../../../common_audio/resampler/main/interface \
$(LOCAL_PATH)/../../../common_audio/signal_processing_library/main/interface \
- $(LOCAL_PATH)/../../../modules/audio_coding/main/interface \
$(LOCAL_PATH)/../../../modules/interface \
+ $(LOCAL_PATH)/../../../modules/audio_coding/main/interface \
$(LOCAL_PATH)/../../../modules/audio_conference_mixer/interface \
$(LOCAL_PATH)/../../../modules/audio_device/main/interface \
$(LOCAL_PATH)/../../../modules/audio_processing/main/interface \
@@ -73,17 +67,10 @@
$(LOCAL_PATH)/../../../modules/utility/interface \
$(LOCAL_PATH)/../../../system_wrappers/interface
-# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS :=
-
-LOCAL_LDFLAGS :=
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_SHARED_LIBRARIES := libcutils \
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
libdl \
libstlport
-LOCAL_ADDITIONAL_DEPENDENCIES :=
ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
LOCAL_LDLIBS += -ldl -lpthread
@@ -93,6 +80,7 @@
LOCAL_SHARED_LIBRARIES += libdl
endif
+ifndef NDK_ROOT
include external/stlport/libstlport.mk
+endif
include $(BUILD_STATIC_LIBRARY)
-#include $(BUILD_SHARED_LIBRARY)
\ No newline at end of file
diff --git a/src/voice_engine/main/test/auto_test/Android.mk b/src/voice_engine/main/test/auto_test/Android.mk
index 81e8b17..8d5ca6a 100644
--- a/src/voice_engine/main/test/auto_test/Android.mk
+++ b/src/voice_engine/main/test/auto_test/Android.mk
@@ -12,6 +12,8 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../android-webrtc.mk
+
LOCAL_MODULE_TAGS := tests
LOCAL_CPP_EXTENSION := .cc
LOCAL_SRC_FILES:= \
@@ -20,21 +22,18 @@
voe_stress_test.cc \
voe_unit_test.cc \
voe_extended_test.cc
+
# Flags passed to both C and C++ files.
LOCAL_CFLAGS := \
'-DWEBRTC_TARGET_PC' \
'-DWEBRTC_LINUX' \
- '-DWEBRTC_ANDROID' \
- '-DANDROID'
-LOCAL_CPPFLAGS :=
-LOCAL_LDFLAGS :=
+ '-DWEBRTC_ANDROID'
+
LOCAL_C_INCLUDES := \
- external/gtest/include \
$(LOCAL_PATH)/../../interface \
$(LOCAL_PATH)/../../../.. \
- $(LOCAL_PATH)/../../../../system_wrappers/interface
-
-LOCAL_STATIC_LIBRARIES :=
+ $(LOCAL_PATH)/../../../../system_wrappers/interface \
+ external/gtest/include \
LOCAL_SHARED_LIBRARIES := \
libutils \
@@ -43,5 +42,10 @@
LOCAL_MODULE:= webrtc_voe_autotest
-include external/stlport/libstlport.mk
+ifdef NDK_ROOT
include $(BUILD_EXECUTABLE)
+else
+include external/stlport/libstlport.mk
+include $(BUILD_NATIVE_TEST)
+endif
+
diff --git a/src/voice_engine/main/test/cmd_test/Android.mk b/src/voice_engine/main/test/cmd_test/Android.mk
index 960672e..0a843f6 100644
--- a/src/voice_engine/main/test/cmd_test/Android.mk
+++ b/src/voice_engine/main/test/cmd_test/Android.mk
@@ -12,6 +12,8 @@
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/../../../../../android-webrtc.mk
+
LOCAL_MODULE_TAGS := tests
LOCAL_CPP_EXTENSION := .cc
LOCAL_SRC_FILES:= \
@@ -20,18 +22,13 @@
# Flags passed to both C and C++ files.
LOCAL_CFLAGS := \
'-DWEBRTC_TARGET_PC' \
- '-DWEBRTC_ANDROID' \
- '-DANDROID' \
- '-DDEBUG'
-LOCAL_CPPFLAGS :=
-LOCAL_LDFLAGS :=
+ '-DDEBUG'
+
LOCAL_C_INCLUDES := \
- external/gtest/include \
$(LOCAL_PATH)/../../interface \
$(LOCAL_PATH)/../../../.. \
- frameworks/base/include
-
-LOCAL_STATIC_LIBRARIES :=
+ external/gtest/include \
+ frameworks/base/include
LOCAL_SHARED_LIBRARIES := \
libutils \
@@ -48,5 +45,9 @@
LOCAL_MODULE:= webrtc_voe_cmd
-include external/stlport/libstlport.mk
+ifdef NDK_ROOT
include $(BUILD_EXECUTABLE)
+else
+include external/stlport/libstlport.mk
+include $(BUILD_NATIVE_TEST)
+endif