libbcc-device-build.mk revision ddf5661793de8fb4e16906b7f7822972fcb13c6d
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
17LOCAL_CFLAGS := \
18  -Wall \
19  -Wno-unused-parameter \
20  -Werror \
21  -DTARGET_BUILD \
22  $(LOCAL_CFLAGS)
23
24ifeq ($(TARGET_BUILD_VARIANT),eng)
25LOCAL_CFLAGS += -DANDROID_ENGINEERING_BUILD
26endif
27
28#=====================================================================
29# Architecture Selection
30#=====================================================================
31# Note: We should only use -DFORCE_ARCH_CODEGEN on target build.
32# For the host build, we will include as many architecture as possible,
33# so that we can test the execution engine easily.
34
35ifeq ($(TARGET_ARCH),arm)
36  LOCAL_CFLAGS += -DFORCE_ARM_CODEGEN
37  ifeq ($(ARCH_ARM_HAVE_VFP),true)
38    LOCAL_CFLAGS += -DARCH_ARM_HAVE_VFP
39    ifeq ($(ARCH_ARM_HAVE_VFP_D32),true)
40      LOCAL_CFLAGS += -DARCH_ARM_HAVE_VFP_D32
41    endif
42  endif
43  ifeq ($(ARCH_ARM_HAVE_NEON),true)
44    LOCAL_CFLAGS += -DARCH_ARM_HAVE_NEON
45  endif
46else
47  ifeq ($(TARGET_ARCH),mips)
48    LOCAL_CFLAGS += -DFORCE_MIPS_CODEGEN
49  else
50    ifeq ($(TARGET_ARCH),x86)
51      LOCAL_CFLAGS += -DFORCE_X86_CODEGEN
52    else
53      $(error Unsupported architecture $(TARGET_ARCH))
54    endif
55  endif
56endif
57
58LOCAL_C_INCLUDES := \
59  $(LIBBCC_ROOT_PATH) \
60  $(LIBBCC_ROOT_PATH)/helper \
61  $(LIBBCC_ROOT_PATH)/include \
62  $(LOCAL_C_INCLUDES)
63