Home | History | Annotate | Download | only in libbcc
      1 #=====================================================================
      2 # Calculate SHA1 checksum for libbcc.so, libRS.so and libclcore.bc
      3 #=====================================================================
      4 ifneq (true,$(DISABLE_LLVM_DEVICE_BUILDS))
      5 include $(CLEAR_VARS)
      6 
      7 LOCAL_MODULE := libbcc.sha1
      8 LOCAL_MODULE_TAGS := optional
      9 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
     10 
     11 libbcc_SHA1_SRCS := \
     12   $($(my_2nd_arch_prefix)TARGET_OUT_INTERMEDIATE_LIBRARIES)/libbcc.so \
     13   $($(my_2nd_arch_prefix)TARGET_OUT_INTERMEDIATE_LIBRARIES)/libcompiler_rt.so \
     14   $($(my_2nd_arch_prefix)TARGET_OUT_INTERMEDIATE_LIBRARIES)/libRS.so \
     15   $(call intermediates-dir-for,SHARED_LIBRARIES,libclcore.bc,,,$(my_2nd_arch_prefix))/libclcore.bc \
     16   $(call intermediates-dir-for,SHARED_LIBRARIES,libclcore_debug.bc,,,$(my_2nd_arch_prefix))/libclcore_debug.bc
     17 
     18 ifeq ($(TARGET_$(my_2nd_arch_prefix)ARCH),arm)
     19 ifeq ($(ARCH_ARM_HAVE_NEON),true)
     20   libbcc_SHA1_SRCS += \
     21     $(call intermediates-dir-for,SHARED_LIBRARIES,libclcore_neon.bc,,,$(my_2nd_arch_prefix))/libclcore_neon.bc
     22 endif
     23 endif
     24 
     25 libbcc_GEN_SHA1_STAMP := $(LOCAL_PATH)/tools/build/gen-sha1-stamp.py
     26 intermediates := $(call local-intermediates-dir,,$(my_2nd_arch_prefix))
     27 
     28 libbcc_SHA1_ASM := $(intermediates)/libbcc.sha1.S
     29 LOCAL_GENERATED_SOURCES += $(libbcc_SHA1_ASM)
     30 $(libbcc_SHA1_ASM): PRIVATE_SHA1_SRCS := $(libbcc_SHA1_SRCS)
     31 $(libbcc_SHA1_ASM): $(libbcc_SHA1_SRCS) $(libbcc_GEN_SHA1_STAMP)
     32 	@echo libbcc.sha1: $@
     33 	$(hide) mkdir -p $(dir $@)
     34 	$(hide) $(libbcc_GEN_SHA1_STAMP) $(PRIVATE_SHA1_SRCS) > $@
     35 
     36 LOCAL_CFLAGS += -D_REENTRANT -DPIC -fPIC
     37 LOCAL_CFLAGS += -O3 -nodefaultlibs -nostdlib
     38 
     39 LOCAL_MODULE_TARGET_ARCH := $(filter $(TARGET_$(my_2nd_arch_prefix)ARCH),$(LLVM_SUPPORTED_ARCH))
     40 
     41 ifdef LOCAL_MODULE_TARGET_ARCH
     42 include $(BUILD_SHARED_LIBRARY)
     43 endif
     44 endif
     45