Introduced WEBRTC_ANDROID_PLATFORM_BUILD and make test app build on all platforms

BUG=
TEST=build on all platforms
Review URL: https://webrtc-codereview.appspot.com/446012

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1907 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
leozwang@webrtc.org 2012-03-16 21:36:00 +00:00
parent 1c7d8827ee
commit a3736345dd
4 changed files with 98 additions and 5 deletions

View File

@ -33,7 +33,9 @@ LOCAL_SRC_FILES := \
# Flags passed to both C and C++ files.
LOCAL_CFLAGS := \
$(MY_WEBRTC_COMMON_DEFS) \
'-DWEBRTC_NS_FIXED'
'-DWEBRTC_NS_FIXED' \
'-DWEBRTC_ANDROID_PLATFORM_BUILD' \
'-DWEBRTC_AUDIOPROC_DEBUG_DUMP'
# floating point
# -DWEBRTC_NS_FLOAT'
@ -59,3 +61,89 @@ ifndef NDK_ROOT
include external/stlport/libstlport.mk
endif
include $(BUILD_STATIC_LIBRARY)
# apm process test app
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_CPP_EXTENSION := .cc
LOCAL_SRC_FILES:= \
$(call all-proto-files-under, .) \
test/process_test.cc
# Flags passed to both C and C++ files.
LOCAL_CFLAGS := \
$(MY_WEBRTC_COMMON_DEFS) \
'-DWEBRTC_ANDROID_PLATFORM_BUILD' \
'-DWEBRTC_AUDIOPROC_DEBUG_DUMP'
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/include \
$(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/../.. \
$(LOCAL_PATH)/../../system_wrappers/interface \
external/gtest/include
LOCAL_STATIC_LIBRARIES := \
libgtest \
libprotobuf-cpp-2.3.0-lite
LOCAL_SHARED_LIBRARIES := \
libutils \
libstlport \
libwebrtc_audio_preprocessing
LOCAL_MODULE:= webrtc_audioproc
ifdef NDK_ROOT
include $(BUILD_EXECUTABLE)
else
include external/stlport/libstlport.mk
include $(BUILD_NATIVE_TEST)
endif
# apm unit test app
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_CPP_EXTENSION := .cc
LOCAL_SRC_FILES:= \
$(call all-proto-files-under, test) \
test/unit_test.cc \
../../../test/testsupport/fileutils.cc
# Flags passed to both C and C++ files.
LOCAL_CFLAGS := \
$(MY_WEBRTC_COMMON_DEFS) \
'-DWEBRTC_AUDIOPROC_FIXED_PROFILE' \
'-DWEBRTC_ANDROID_PLATFORM_BUILD' \
'-DWEBRTC_AUDIOPROC_DEBUG_DUMP'
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/include \
$(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/../.. \
$(LOCAL_PATH)/../../../test \
$(LOCAL_PATH)/../../system_wrappers/interface \
$(LOCAL_PATH)/../../common_audio/signal_processing/include \
external/gtest/include \
external/protobuf/src
LOCAL_STATIC_LIBRARIES := \
libgtest \
libprotobuf-cpp-2.3.0-lite
LOCAL_SHARED_LIBRARIES := \
libstlport \
libwebrtc_audio_preprocessing
LOCAL_MODULE:= webrtc_audioproc_unittest
ifdef NDK_ROOT
include $(BUILD_EXECUTABLE)
else
include external/stlport/libstlport.mk
include $(BUILD_NATIVE_TEST)
endif

View File

@ -28,7 +28,7 @@
#ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP
// Files generated at build-time by the protobuf compiler.
#ifdef WEBRTC_ANDROID
#ifdef WEBRTC_ANDROID_PLATFORM_BUILD
#include "external/webrtc/src/modules/audio_processing/debug.pb.h"
#else
#include "webrtc/audio_processing/debug.pb.h"

View File

@ -21,9 +21,11 @@
#include "module_common_types.h"
#include "scoped_ptr.h"
#include "tick_util.h"
#ifdef WEBRTC_ANDROID_PLATFORM_BUILD
#include "external/webrtc/src/modules/audio_processing/debug.pb.h"
#else
#include "webrtc/audio_processing/debug.pb.h"
#endif
using webrtc::AudioFrame;
using webrtc::AudioProcessing;

View File

@ -20,8 +20,11 @@
#include "testsupport/fileutils.h"
#include "thread_wrapper.h"
#include "trace.h"
#ifdef WEBRTC_ANDROID_PLATFORM_BUILD
#include "external/webrtc/src/modules/audio_processing/test/unittest.pb.h"
#else
#include "webrtc/audio_processing/unittest.pb.h"
#endif
#if (defined(WEBRTC_AUDIOPROC_FIXED_PROFILE)) || \
(defined(WEBRTC_LINUX) && defined(WEBRTC_ARCH_X86_64) && !defined(NDEBUG))