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   libbccCore \
     30   libbccSupport
     31 
     32 #=====================================================================
     33 # Device Shared Library libbcc
     34 #=====================================================================
     35 ifneq (true,$(DISABLE_LLVM_DEVICE_BUILDS))
     36 
     37 include $(CLEAR_VARS)
     38 
     39 LOCAL_MODULE := libbcc
     40 LOCAL_MODULE_TAGS := optional
     41 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
     42 
     43 LOCAL_WHOLE_STATIC_LIBRARIES := $(libbcc_WHOLE_STATIC_LIBRARIES)
     44 
     45 LOCAL_SHARED_LIBRARIES := libbcinfo libLLVM libdl libutils libcutils liblog libc++
     46 
     47 # Modules that need get installed if and only if the target libbcc.so is
     48 # installed.
     49 LOCAL_REQUIRED_MODULES := libclcore.bc libclcore_debug.bc libcompiler_rt
     50 
     51 LOCAL_REQUIRED_MODULES_x86 += libclcore_x86.bc
     52 LOCAL_REQUIRED_MODULES_x86_64 += libclcore_x86.bc
     53 
     54 ifeq ($(ARCH_ARM_HAVE_NEON),true)
     55   LOCAL_REQUIRED_MODULES_arm += libclcore_neon.bc
     56 endif
     57 
     58 include $(LIBBCC_DEVICE_BUILD_MK)
     59 include $(LLVM_DEVICE_BUILD_MK)
     60 include $(BUILD_SHARED_LIBRARY)
     61 endif
     62 
     63 #=====================================================================
     64 # Host Shared Library libbcc
     65 #=====================================================================
     66 
     67 # Don't build for unbundled branches
     68 ifeq (,$(TARGET_BUILD_APPS))
     69 
     70 include $(CLEAR_VARS)
     71 
     72 LOCAL_MODULE := libbcc
     73 LOCAL_MODULE_TAGS := optional
     74 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
     75 LOCAL_IS_HOST_MODULE := true
     76 
     77 ifneq ($(HOST_OS),windows)
     78 LOCAL_CLANG := true
     79 endif
     80 
     81 LOCAL_WHOLE_STATIC_LIBRARIES += $(libbcc_WHOLE_STATIC_LIBRARIES)
     82 
     83 LOCAL_STATIC_LIBRARIES += \
     84   libutils \
     85   libcutils \
     86   liblog
     87 
     88 LOCAL_SHARED_LIBRARIES := libbcinfo libLLVM
     89 
     90 ifndef USE_MINGW
     91 LOCAL_LDLIBS := -ldl -lpthread
     92 endif
     93 
     94 include $(LIBBCC_HOST_BUILD_MK)
     95 include $(LLVM_HOST_BUILD_MK)
     96 include $(BUILD_HOST_SHARED_LIBRARY)
     97 
     98 endif # Don't build in unbundled branches
     99 
    100 #=====================================================================
    101 # Include Subdirectories
    102 #=====================================================================
    103 include $(call all-makefiles-under,$(LOCAL_PATH))
    104