Eric Laurent | e48d584 | 2011-06-16 21:50:24 -0700 | [diff] [blame] | 1 | # 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 | |
Eric Laurent | c55a963 | 2012-01-31 14:20:52 -0800 | [diff] [blame] | 9 | # These defines will apply to all source files |
| 10 | # Think again before changing it |
| 11 | MY_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] |
Ying Wang | 792d546 | 2014-03-10 15:26:43 -0700 | [diff] [blame] | 22 | MY_WEBRTC_COMMON_DEFS_arm := \ |
Eric Laurent | c55a963 | 2012-01-31 14:20:52 -0800 | [diff] [blame] | 23 | '-DWEBRTC_ARCH_ARM' |
| 24 | # '-DWEBRTC_DETECT_ARM_NEON' # only used in a build configuration without Neon |
| 25 | # TODO(kma): figure out if the above define could be moved to NDK build only. |
Eric Laurent | e48d584 | 2011-06-16 21:50:24 -0700 | [diff] [blame] | 26 | |
Eric Laurent | c55a963 | 2012-01-31 14:20:52 -0800 | [diff] [blame] | 27 | # TODO(kma): test if the code under next two macros works with generic GCC compilers |
| 28 | ifeq ($(ARCH_ARM_HAVE_NEON),true) |
Ying Wang | 792d546 | 2014-03-10 15:26:43 -0700 | [diff] [blame] | 29 | MY_WEBRTC_COMMON_DEFS_arm += \ |
Eric Laurent | c55a963 | 2012-01-31 14:20:52 -0800 | [diff] [blame] | 30 | '-DWEBRTC_ARCH_ARM_NEON' |
| 31 | MY_ARM_CFLAGS_NEON := \ |
| 32 | -flax-vector-conversions |
| 33 | endif |
Eric Laurent | e48d584 | 2011-06-16 21:50:24 -0700 | [diff] [blame] | 34 | |
Eric Laurent | c55a963 | 2012-01-31 14:20:52 -0800 | [diff] [blame] | 35 | ifneq (,$(filter '-DWEBRTC_DETECT_ARM_NEON' '-DWEBRTC_ARCH_ARM_NEON', \ |
Ying Wang | 446440a | 2014-03-10 17:26:14 -0700 | [diff] [blame] | 36 | $(MY_WEBRTC_COMMON_DEFS_arm))) |
Eric Laurent | c55a963 | 2012-01-31 14:20:52 -0800 | [diff] [blame] | 37 | WEBRTC_BUILD_NEON_LIBS := true |
| 38 | endif |
Eric Laurent | e48d584 | 2011-06-16 21:50:24 -0700 | [diff] [blame] | 39 | |
Eric Laurent | c55a963 | 2012-01-31 14:20:52 -0800 | [diff] [blame] | 40 | ifeq ($(ARCH_ARM_HAVE_ARMV7A),true) |
Ying Wang | 792d546 | 2014-03-10 15:26:43 -0700 | [diff] [blame] | 41 | MY_WEBRTC_COMMON_DEFS_arm += \ |
Eric Laurent | c55a963 | 2012-01-31 14:20:52 -0800 | [diff] [blame] | 42 | '-DWEBRTC_ARCH_ARM_V7A' |
| 43 | endif |
Eric Laurent | e48d584 | 2011-06-16 21:50:24 -0700 | [diff] [blame] | 44 | |
Ying Wang | 792d546 | 2014-03-10 15:26:43 -0700 | [diff] [blame] | 45 | MY_WEBRTC_COMMON_DEFS_x86 := \ |
Eric Laurent | c55a963 | 2012-01-31 14:20:52 -0800 | [diff] [blame] | 46 | '-DWEBRTC_USE_SSE2' |