Logan Chien | 3bb7707 | 2011-09-17 16:53:53 +0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2011 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 | |
| 18 | #===================================================================== |
| 19 | # Architecture Selection |
| 20 | #===================================================================== |
| 21 | |
| 22 | ifeq ($(LOCAL_IS_HOST_MODULE),) # Target Build |
| 23 | |
| 24 | # Note: We should only use -DFORCE_ARCH_CODEGEN on target build. |
| 25 | # For the host build, we will include as many architecture as possible, |
| 26 | # so that we can test the execution engine easily. |
| 27 | |
| 28 | ifeq ($(TARGET_ARCH),arm) |
| 29 | LOCAL_CFLAGS += -DFORCE_ARM_CODEGEN |
| 30 | ifeq ($(ARCH_ARM_HAVE_VFP),true) |
| 31 | LOCAL_CFLAGS += -DARCH_ARM_HAVE_VFP |
| 32 | ifeq ($(ARCH_ARM_HAVE_VFP_D32),true) |
| 33 | LOCAL_CFLAGS += -DARCH_ARM_HAVE_VFP_D32 |
| 34 | endif |
| 35 | endif |
| 36 | ifeq ($(ARCH_ARM_HAVE_NEON),true) |
| 37 | LOCAL_CFLAGS += -DARCH_ARM_HAVE_NEON |
| 38 | endif |
| 39 | else |
Logan Chien | 21392f0 | 2011-11-26 20:32:01 +0800 | [diff] [blame] | 40 | ifeq ($(TARGET_ARCH),mips) |
| 41 | LOCAL_CFLAGS += -DFORCE_MIPS_CODEGEN |
Logan Chien | 3bb7707 | 2011-09-17 16:53:53 +0800 | [diff] [blame] | 42 | else |
Logan Chien | 21392f0 | 2011-11-26 20:32:01 +0800 | [diff] [blame] | 43 | ifeq ($(TARGET_ARCH),x86) |
| 44 | LOCAL_CFLAGS += -DFORCE_X86_CODEGEN |
| 45 | else |
| 46 | $(error Unsupported architecture $(TARGET_ARCH)) |
| 47 | endif |
Logan Chien | 3bb7707 | 2011-09-17 16:53:53 +0800 | [diff] [blame] | 48 | endif |
| 49 | endif |
| 50 | |
| 51 | endif |