1#===================================================================== 2# Calculate SHA1 checksum for libbcc.so, libRS.so and libclcore.bc 3#===================================================================== 4ifneq (true,$(DISABLE_LLVM_DEVICE_BUILDS)) 5include $(CLEAR_VARS) 6 7LOCAL_MODULE := libbcc.sha1 8LOCAL_MODULE_TAGS := optional 9LOCAL_MODULE_CLASS := SHARED_LIBRARIES 10 11libbcc_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 18ifeq ($(TARGET_$(my_2nd_arch_prefix)ARCH),arm) 19ifeq ($(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 22endif 23endif 24 25libbcc_GEN_SHA1_STAMP := $(LOCAL_PATH)/tools/build/gen-sha1-stamp.py 26intermediates := $(call local-intermediates-dir,,$(my_2nd_arch_prefix)) 27 28libbcc_SHA1_ASM := $(intermediates)/libbcc.sha1.S 29LOCAL_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 36LOCAL_CFLAGS += -D_REENTRANT -DPIC -fPIC 37LOCAL_CFLAGS += -O3 -nodefaultlibs -nostdlib 38 39LOCAL_MODULE_TARGET_ARCH := $(filter $(TARGET_$(my_2nd_arch_prefix)ARCH),$(LLVM_SUPPORTED_ARCH)) 40 41ifdef LOCAL_MODULE_TARGET_ARCH 42include $(BUILD_SHARED_LIBRARY) 43endif 44endif 45