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 # Root Path for Other Projects 20 #===================================================================== 21 22 LLVM_ROOT_PATH := external/llvm 23 LIBBCC_ROOT_PATH := frameworks/compile/libbcc 24 RSLOADER_ROOT_PATH := frameworks/compile/linkloader 25 26 27 #===================================================================== 28 # Configurations 29 #===================================================================== 30 31 libbcc_USE_OLD_JIT := 0 32 libbcc_USE_MCJIT := 1 33 34 libbcc_USE_CACHE := 1 35 36 libbcc_DEBUG_OLD_JIT_DISASSEMBLER := 0 37 libbcc_DEBUG_MCJIT_DISASSEMBLER := 0 38 39 libbcc_USE_LOGGER := 1 40 libbcc_USE_FUNC_LOGGER := 0 41 libbcc_DEBUG_BCC_REFLECT := 0 42 libbcc_DEBUG_MCJIT_REFLECT := 0 43 44 45 #===================================================================== 46 # Automatic Configurations 47 #===================================================================== 48 49 ifeq ($(libbcc_USE_OLD_JIT),0) 50 libbcc_DEBUG_OLD_JIT_DISASSEMBLER := 0 51 endif 52 53 ifeq ($(libbcc_USE_MCJIT),0) 54 libbcc_DEBUG_MCJIT_DISASSEMBLER := 0 55 endif 56 57 ifeq ($(libbcc_DEBUG_OLD_JIT_DISASSEMBLER)$(libbcc_DEBUG_MCJIT_DISASSEMBLER),00) 58 libbcc_USE_DISASSEMBLER := 0 59 else 60 libbcc_USE_DISASSEMBLER := 1 61 endif 62 63 64 #===================================================================== 65 # Common Variables 66 #===================================================================== 67 68 libbcc_CFLAGS := -Wall -Wno-unused-parameter -Werror 69 ifneq ($(TARGET_BUILD_VARIANT),eng) 70 libbcc_CFLAGS += -D__DISABLE_ASSERTS 71 endif 72 73 ifeq ($(TARGET_ARCH),arm) 74 libbcc_CFLAGS += -DFORCE_ARM_CODEGEN=1 75 ifeq (true,$(ARCH_ARM_HAVE_VFP)) 76 libbcc_CFLAGS += -DARCH_ARM_HAVE_VFP 77 ifeq (true,$(ARCH_ARM_HAVE_VFP_D32)) 78 libbcc_CFLAGS += -DARCH_ARM_HAVE_VFP_D32 79 endif 80 endif 81 ifeq (true,$(ARCH_ARM_HAVE_NEON)) 82 libbcc_CFLAGS += -DARCH_ARM_HAVE_NEON 83 endif 84 else 85 ifeq ($(TARGET_ARCH),x86) 86 libbcc_CFLAGS += -DFORCE_X86_CODEGEN=1 87 else 88 $(error Unsupported TARGET_ARCH $(TARGET_ARCH)) 89 endif 90 endif 91 92 # Include File Search Path 93 libbcc_C_INCLUDES := \ 94 $(RSLOADER_ROOT_PATH)/android \ 95 $(LIBBCC_ROOT_PATH)/lib \ 96 $(LIBBCC_ROOT_PATH)/helper \ 97 $(LIBBCC_ROOT_PATH)/include \ 98 $(LIBBCC_ROOT_PATH) 99