Zonr Chang | ddf5661 | 2012-04-12 15:38:42 +0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2012 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
| 17 | LOCAL_CFLAGS := \ |
| 18 | -Wall \ |
| 19 | -Wno-unused-parameter \ |
| 20 | -Werror \ |
| 21 | -DTARGET_BUILD \ |
| 22 | $(LOCAL_CFLAGS) |
| 23 | |
| 24 | ifeq ($(TARGET_BUILD_VARIANT),eng) |
| 25 | LOCAL_CFLAGS += -DANDROID_ENGINEERING_BUILD |
Stephen Hines | 6e9e89d | 2012-07-27 19:16:04 -0700 | [diff] [blame] | 26 | else |
| 27 | LOCAL_CFLAGS += -D__DISABLE_ASSERTS |
Zonr Chang | ddf5661 | 2012-04-12 15:38:42 +0800 | [diff] [blame] | 28 | endif |
| 29 | |
| 30 | #===================================================================== |
| 31 | # Architecture Selection |
| 32 | #===================================================================== |
| 33 | # Note: We should only use -DFORCE_ARCH_CODEGEN on target build. |
| 34 | # For the host build, we will include as many architecture as possible, |
| 35 | # so that we can test the execution engine easily. |
| 36 | |
Colin Cross | 71df050 | 2014-02-04 16:27:32 -0800 | [diff] [blame^] | 37 | LOCAL_MODULE_TARGET_ARCH := $(LLVM_SUPPORTED_ARCH) |
Ashok Bhat | ad7d4c3 | 2013-11-22 13:29:44 +0000 | [diff] [blame] | 38 | |
Colin Cross | 71df050 | 2014-02-04 16:27:32 -0800 | [diff] [blame^] | 39 | ifeq ($(TARGET_ARCH),arm64) |
| 40 | $(info TODOArm64: $(LOCAL_PATH)/Android.mk Add Arm64 define to LOCAL_CFLAGS) |
| 41 | endif |
| 42 | |
| 43 | ifeq ($(TARGET_ARCH),mips64) |
| 44 | $(info TODOMips64: $(LOCAL_PATH)/Android.mk Add Mips64 define to LOCAL_CFLAGS) |
| 45 | endif |
| 46 | |
| 47 | LOCAL_CFLAGS_arm += -DFORCE_ARM_CODEGEN |
| 48 | ifeq ($(ARCH_ARM_HAVE_VFP),true) |
| 49 | LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_VFP |
| 50 | ifeq ($(ARCH_ARM_HAVE_VFP_D32),true) |
| 51 | LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_VFP_D32 |
Zonr Chang | ddf5661 | 2012-04-12 15:38:42 +0800 | [diff] [blame] | 52 | endif |
Colin Cross | 71df050 | 2014-02-04 16:27:32 -0800 | [diff] [blame^] | 53 | endif |
| 54 | ifeq ($(ARCH_ARM_HAVE_NEON),true) |
| 55 | LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_NEON |
| 56 | endif |
| 57 | |
| 58 | LOCAL_CFLAGS_mips += -DFORCE_MIPS_CODEGEN |
| 59 | |
| 60 | LOCAL_CFLAGS_x86 += -DFORCE_X86_CODEGEN |
| 61 | LOCAL_CFLAGS_x86_64 += -DFORCE_X86_CODEGEN |
| 62 | |
| 63 | ifeq (,$(filter $(TARGET_ARCH),arm64 arm mips mips64 x86 x86_64)) |
| 64 | $(error Unsupported architecture $(TARGET_ARCH)) |
Zonr Chang | ddf5661 | 2012-04-12 15:38:42 +0800 | [diff] [blame] | 65 | endif |
| 66 | |
| 67 | LOCAL_C_INCLUDES := \ |
Stephen Hines | 4e98648 | 2013-06-15 21:53:29 -0700 | [diff] [blame] | 68 | bionic \ |
| 69 | external/stlport/stlport \ |
Zonr Chang | ddf5661 | 2012-04-12 15:38:42 +0800 | [diff] [blame] | 70 | $(LIBBCC_ROOT_PATH)/include \ |
Stephen Hines | 4e98648 | 2013-06-15 21:53:29 -0700 | [diff] [blame] | 71 | $(LLVM_ROOT_PATH)/include \ |
| 72 | $(LLVM_ROOT_PATH)/device/include \ |
Zonr Chang | ddf5661 | 2012-04-12 15:38:42 +0800 | [diff] [blame] | 73 | $(LOCAL_C_INCLUDES) |