blob: d063dcd91f576cb0b93cf76ef54f5b29e2db2690 [file] [log] [blame]
niklase@google.comda159d62011-05-30 11:51:34 +00001# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
leozwang@google.com79835d12011-08-05 21:01:02 +00009# These defines will apply to all source files
10# Think again before changing it
11MY_WEBRTC_COMMON_DEFS := \
12 '-DWEBRTC_TARGET_PC' \
13 '-DWEBRTC_LINUX' \
14 '-DWEBRTC_THREAD_RR' \
15 '-DWEBRTC_CLOCK_TYPE_REALTIME' \
16 '-DWEBRTC_ANDROID'
17# The following macros are used by modules,
18# we might need to re-organize them
19# '-DWEBRTC_ANDROID_OPENSLES' [module audio_device]
20# '-DNETEQ_VOICEENGINE_CODECS' [module audio_coding neteq]
21# '-DWEBRTC_MODULE_UTILITY_VIDEO' [module media_file] [module utility]
22ifeq ($(TARGET_ARCH),arm)
23MY_WEBRTC_COMMON_DEFS += \
leozwang@google.com79835d12011-08-05 21:01:02 +000024 '-DWEBRTC_ARCH_ARM'
kma@webrtc.orgb59c0312011-12-03 18:34:50 +000025# '-DWEBRTC_DETECT_ARM_NEON' # only used in a build configuration without Neon
26# TODO(kma): figure out if the above define could be moved to NDK build only.
kma@google.com88110322011-08-08 15:40:10 +000027
28# TODO(kma): test if the code under next two macros works with generic GCC compilers
leozwang@google.com79835d12011-08-05 21:01:02 +000029ifeq ($(ARCH_ARM_HAVE_NEON),true)
30MY_WEBRTC_COMMON_DEFS += \
kma@google.com88110322011-08-08 15:40:10 +000031 '-DWEBRTC_ARCH_ARM_NEON'
32endif
33
kma@webrtc.org746f9e32012-01-04 17:47:57 +000034ifneq (,$(filter '-DWEBRTC_DETECT_ARM_NEON' '-DWEBRTC_ARCH_ARM_NEON', \
35 $(MY_WEBRTC_COMMON_DEFS)))
36WEBRTC_BUILD_NEON_LIBS := true
kma@webrtc.org7a50fa42012-09-08 00:32:59 +000037# TODO(kma): Use MY_ARM_CFLAGS_NEON for Neon libraies in AECM, NS, and iSAC.
38MY_ARM_CFLAGS_NEON := \
kma@webrtc.org0221b782012-09-08 00:09:26 +000039 -mfpu=neon \
40 -mfloat-abi=softfp \
41 -flax-vector-conversions
kma@webrtc.org746f9e32012-01-04 17:47:57 +000042endif
43
kma@google.com88110322011-08-08 15:40:10 +000044ifeq ($(ARCH_ARM_HAVE_ARMV7A),true)
leozwang@google.com79835d12011-08-05 21:01:02 +000045MY_WEBRTC_COMMON_DEFS += \
kma@google.com88110322011-08-08 15:40:10 +000046 '-DWEBRTC_ARCH_ARM_V7A'
leozwang@google.coma39ffa92011-07-25 21:28:22 +000047endif
leozwang@webrtc.org03b7f502012-01-14 01:03:56 +000048
49endif # ifeq ($(TARGET_ARCH),arm)