Home | History | Annotate | Download | only in libbcc
      1 #
      2 # Copyright (C) 2010-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_PATH := $(call my-dir)
     18 LIBBCC_ROOT_PATH := $(LOCAL_PATH)
     19 include $(LIBBCC_ROOT_PATH)/libbcc.mk
     20 
     21 include frameworks/compile/slang/rs_version.mk
     22 
     23 #=====================================================================
     24 # Whole Static Library to Be Linked In
     25 #=====================================================================
     26 
     27 libbcc_WHOLE_STATIC_LIBRARIES += \
     28   libbccRenderscript \
     29   libbccExecutionEngine \
     30   libbccCore \
     31   libbccSupport
     32 
     33 #=====================================================================
     34 # Device Shared Library libbcc
     35 #=====================================================================
     36 ifneq (true,$(DISABLE_LLVM_DEVICE_BUILDS))
     37 ifeq ($(TARGET_ARCH),mips64)
     38 $(info TODOMips64: $(LOCAL_PATH)/Android.mk Enable libbcc build)
     39 endif
     40 
     41 include $(CLEAR_VARS)
     42 
     43 LOCAL_MODULE := libbcc
     44 LOCAL_MODULE_TAGS := optional
     45 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
     46 
     47 LOCAL_WHOLE_STATIC_LIBRARIES := $(libbcc_WHOLE_STATIC_LIBRARIES)
     48 
     49 LOCAL_WHOLE_STATIC_LIBRARIES += librsloader
     50 
     51 LOCAL_SHARED_LIBRARIES := libbcinfo libLLVM libdl libutils libcutils liblog libc++
     52 
     53 # Modules that need get installed if and only if the target libbcc.so is
     54 # installed.
     55 LOCAL_REQUIRED_MODULES := libclcore.bc libclcore_debug.bc libcompiler_rt
     56 
     57 LOCAL_REQUIRED_MODULES_x86 += libclcore_x86.bc
     58 LOCAL_REQUIRED_MODULES_x86_64 += libclcore_x86.bc
     59 
     60 ifeq ($(ARCH_ARM_HAVE_NEON),true)
     61   LOCAL_REQUIRED_MODULES_arm += libclcore_neon.bc
     62 endif
     63 
     64 include $(LIBBCC_DEVICE_BUILD_MK)
     65 include $(LLVM_DEVICE_BUILD_MK)
     66 include $(BUILD_SHARED_LIBRARY)
     67 endif
     68 
     69 #=====================================================================
     70 # Host Shared Library libbcc
     71 #=====================================================================
     72 
     73 # Don't build for unbundled branches
     74 ifeq (,$(TARGET_BUILD_APPS))
     75 
     76 include $(CLEAR_VARS)
     77 
     78 LOCAL_MODULE := libbcc
     79 LOCAL_MODULE_TAGS := optional
     80 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
     81 LOCAL_IS_HOST_MODULE := true
     82 
     83 ifneq ($(HOST_OS),windows)
     84 LOCAL_CLANG := true
     85 endif
     86 
     87 LOCAL_WHOLE_STATIC_LIBRARIES += $(libbcc_WHOLE_STATIC_LIBRARIES)
     88 
     89 LOCAL_WHOLE_STATIC_LIBRARIES += librsloader
     90 
     91 LOCAL_STATIC_LIBRARIES += \
     92   libutils \
     93   libcutils \
     94   liblog
     95 
     96 LOCAL_SHARED_LIBRARIES := libbcinfo libLLVM
     97 
     98 ifndef USE_MINGW
     99 LOCAL_LDLIBS := -ldl -lpthread
    100 endif
    101 
    102 include $(LIBBCC_HOST_BUILD_MK)
    103 include $(LLVM_HOST_BUILD_MK)
    104 include $(BUILD_HOST_SHARED_LIBRARY)
    105 
    106 endif # Don't build in unbundled branches
    107 
    108 #=====================================================================
    109 # Include Subdirectories
    110 #=====================================================================
    111 include $(call all-makefiles-under,$(LOCAL_PATH))
    112