Clean up ANDROID macro definitions [system_wrapper]
Review URL: http://webrtc-codereview.appspot.com/94001 git-svn-id: http://webrtc.googlecode.com/svn/trunk@257 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
13955743b0
commit
b352700ff7
@ -1,4 +1,10 @@
|
||||
# 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)
|
||||
|
||||
@ -8,7 +14,6 @@ LOCAL_ARM_MODE := arm
|
||||
LOCAL_MODULE := libwebrtc_system_wrappers
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_CPP_EXTENSION := .cc
|
||||
LOCAL_GENERATED_SOURCES :=
|
||||
LOCAL_SRC_FILES := \
|
||||
map.cc \
|
||||
rw_lock_generic.cc \
|
||||
@ -33,35 +38,20 @@ LOCAL_SRC_FILES := \
|
||||
trace_linux.cc \
|
||||
rw_lock_linux.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_CLOCK_TYPE_REALTIME' \
|
||||
'-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)/spreadsortlib \
|
||||
$(LOCAL_PATH)/../interface
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(LOCAL_PATH)/../.. \
|
||||
$(LOCAL_PATH)/../interface \
|
||||
$(LOCAL_PATH)/spreadsortlib
|
||||
|
||||
# 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)
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <assert.h>
|
||||
#include <memory.h>
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef WEBRTC_ANDROID
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "cpu_mac.h"
|
||||
#elif defined(WEBRTC_MAC_INTEL)
|
||||
#include "cpu_mac.h"
|
||||
#elif defined(ANDROID)
|
||||
#elif defined(WEBRTC_ANDROID)
|
||||
// Not implemented yet, might be possible to use Linux implementation
|
||||
#else // defined(WEBRTC_LINUX)
|
||||
#include <sys/sysinfo.h>
|
||||
@ -43,7 +43,7 @@ WebRtc_UWord32 CpuWrapper::DetectNumberOfCores()
|
||||
WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1,
|
||||
"Available number of cores:%d", _numberOfCores);
|
||||
|
||||
#elif defined(WEBRTC_LINUX) && !defined(ANDROID)
|
||||
#elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
|
||||
_numberOfCores = get_nprocs();
|
||||
WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1,
|
||||
"Available number of cores:%d", _numberOfCores);
|
||||
@ -78,7 +78,7 @@ CpuWrapper* CpuWrapper::CreateCpu()
|
||||
return new CpuWindows();
|
||||
#elif (defined(WEBRTC_MAC) || defined(WEBRTC_MAC_INTEL))
|
||||
return new CpuWrapperMac();
|
||||
#elif defined(ANDROID)
|
||||
#elif defined(WEBRTC_ANDROID)
|
||||
return 0;
|
||||
#else
|
||||
return new CpuLinux();
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include "rw_lock_windows.h"
|
||||
#elif defined(ANDROID)
|
||||
#elif defined(WEBRTC_ANDROID)
|
||||
#include <stdlib.h>
|
||||
#include "rw_lock_generic.h"
|
||||
#else
|
||||
@ -26,7 +26,7 @@ RWLockWrapper* RWLockWrapper::CreateRWLock()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
RWLockWrapper* lock = new RWLockWindows();
|
||||
#elif defined(ANDROID)
|
||||
#elif defined(WEBRTC_ANDROID)
|
||||
RWLockWrapper* lock = new RWLockWrapperGeneric();
|
||||
#else
|
||||
RWLockWrapper* lock = new RWLockLinux();
|
||||
|
@ -35,7 +35,7 @@ extern "C"
|
||||
}
|
||||
}
|
||||
|
||||
#if (defined(WEBRTC_LINUX) && !defined(ANDROID))
|
||||
#if (defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID))
|
||||
static pid_t gettid()
|
||||
{
|
||||
#if defined(__NR_gettid)
|
||||
@ -86,7 +86,7 @@ ThreadLinux::ThreadLinux(ThreadRunFunction func, ThreadObj obj,
|
||||
int ThreadLinux::Construct()
|
||||
{
|
||||
int result = 0;
|
||||
#if !defined(ANDROID)
|
||||
#if !defined(WEBRTC_ANDROID)
|
||||
// Enable immediate cancellation if requested, see Shutdown()
|
||||
result = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
||||
if (result != 0)
|
||||
@ -191,7 +191,7 @@ bool ThreadLinux::Start(unsigned int& /*threadID*/)
|
||||
return true;
|
||||
}
|
||||
|
||||
#if (defined(WEBRTC_LINUX) && !defined(ANDROID))
|
||||
#if (defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID))
|
||||
bool ThreadLinux::SetAffinity(const int* processorNumbers,
|
||||
const unsigned int amountOfProcessors)
|
||||
{
|
||||
@ -235,7 +235,7 @@ void ThreadLinux::SetNotAlive()
|
||||
|
||||
bool ThreadLinux::Shutdown()
|
||||
{
|
||||
#if !defined(ANDROID)
|
||||
#if !defined(WEBRTC_ANDROID)
|
||||
if (_thread && (0 != pthread_cancel(_thread)))
|
||||
{
|
||||
return false;
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef WEBRTC_ANDROID
|
||||
#include <pthread.h>
|
||||
#else
|
||||
#include <iostream>
|
||||
|
Loading…
Reference in New Issue
Block a user