Home | History | Annotate | Download | only in libbcc
      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_CLANG := true
     18 
     19 LOCAL_CFLAGS := \
     20   -Wall \
     21   -Wno-unused-parameter \
     22   -Werror \
     23   -DTARGET_BUILD \
     24   $(RS_VERSION_DEFINE) \
     25   $(LOCAL_CFLAGS)
     26 
     27 
     28 ifneq ($(BOARD_OVERRIDE_RS_CPU_VARIANT_32),)
     29 LOCAL_CFLAGS += -DFORCE_CPU_VARIANT_32=$(BOARD_OVERRIDE_RS_CPU_VARIANT_32)
     30 endif
     31 
     32 ifneq ($(BOARD_OVERRIDE_RS_CPU_VARIANT_64),)
     33 LOCAL_CFLAGS += -DFORCE_CPU_VARIANT_64=$(BOARD_OVERRIDE_RS_CPU_VARIANT_64)
     34 endif
     35 
     36 ifeq ($(TARGET_BUILD_VARIANT),eng)
     37 LOCAL_CFLAGS += -DANDROID_ENGINEERING_BUILD
     38 else
     39 LOCAL_CFLAGS += -D__DISABLE_ASSERTS
     40 endif
     41 
     42 ifeq ($(FORCE_BUILD_LLVM_DISABLE_NDEBUG),true)
     43 LOCAL_CFLAGS += -DFORCE_BUILD_LLVM_DISABLE_NDEBUG
     44 endif
     45 
     46 #=====================================================================
     47 # Architecture Selection
     48 #=====================================================================
     49 # Note: We should only use -DFORCE_ARCH_CODEGEN on target build.
     50 # For the host build, we will include as many architecture as possible,
     51 # so that we can test the execution engine easily.
     52 
     53 LOCAL_MODULE_TARGET_ARCH := $(LLVM_SUPPORTED_ARCH)
     54 
     55 include frameworks/compile/libbcc/libbcc-targets.mk
     56 
     57 LOCAL_C_INCLUDES := \
     58   $(LIBBCC_ROOT_PATH)/include \
     59   $(RS_ROOT_PATH) \
     60   $(LLVM_ROOT_PATH)/include \
     61   $(LLVM_ROOT_PATH)/device/include \
     62   $(LOCAL_C_INCLUDES)
     63