1# Note that some host libraries have the same module name as the target 2# libraries. This is currently needed to build, for example, adb. But it's 3# probably something that should be changed. 4 5LOCAL_PATH := $(call my-dir) 6 7## libcrypto 8 9# Target static library 10include $(CLEAR_VARS) 11LOCAL_MODULE_TAGS := optional 12LOCAL_MODULE := libcrypto_static 13LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/src/include 14LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/crypto-sources.mk 15LOCAL_SDK_VERSION := 9 16LOCAL_CFLAGS = -Wno-unused-parameter 17# sha256-armv4.S does not compile with clang. 18LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as 19ifeq ($(TARGET_ARCH),arm64) 20ifeq ($(USE_CLANG_PLATFORM_BUILD),true) 21LOCAL_ASFLAGS += -march=armv8-a+crypto 22endif 23endif 24include $(LOCAL_PATH)/crypto-sources.mk 25include $(BUILD_STATIC_LIBRARY) 26 27# Target shared library 28include $(CLEAR_VARS) 29LOCAL_MODULE_TAGS := optional 30LOCAL_MODULE := libcrypto 31LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/src/include 32LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/crypto-sources.mk 33LOCAL_CFLAGS += -fvisibility=hidden -DBORINGSSL_SHARED_LIBRARY -DBORINGSSL_IMPLEMENTATION -Wno-unused-parameter 34LOCAL_SDK_VERSION := 9 35# sha256-armv4.S does not compile with clang. 36LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as 37ifeq ($(TARGET_ARCH),arm64) 38ifeq ($(USE_CLANG_PLATFORM_BUILD),true) 39LOCAL_ASFLAGS += -march=armv8-a+crypto 40endif 41endif 42include $(LOCAL_PATH)/crypto-sources.mk 43include $(BUILD_SHARED_LIBRARY) 44 45# Target static tool 46include $(CLEAR_VARS) 47LOCAL_CFLAGS += -Wall -Werror -std=c++0x 48LOCAL_CPP_EXTENSION := cc 49LOCAL_MODULE := bssl 50LOCAL_MODULE_TAGS := optional 51LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/sources.mk 52LOCAL_CFLAGS = -Wno-unused-parameter 53LOCAL_SHARED_LIBRARIES=libcrypto libssl 54include $(LOCAL_PATH)/sources.mk 55LOCAL_SRC_FILES = $(tool_sources) 56include $(BUILD_EXECUTABLE) 57 58# Host static library 59include $(CLEAR_VARS) 60LOCAL_MODULE_TAGS := optional 61LOCAL_MODULE := libcrypto_static 62LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/src/include 63LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/crypto-sources.mk 64LOCAL_CFLAGS = -Wno-unused-parameter 65# Windows and Macs both have problems with assembly files 66ifneq ($(HOST_OS),linux) 67LOCAL_CFLAGS += -DOPENSSL_NO_ASM 68endif 69include $(LOCAL_PATH)/crypto-sources.mk 70include $(BUILD_HOST_STATIC_LIBRARY) 71 72# Host shared library 73include $(CLEAR_VARS) 74LOCAL_MODULE_TAGS := optional 75LOCAL_MODULE := libcrypto-host 76LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include 77LOCAL_MULTILIB := both 78LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/crypto-sources.mk 79LOCAL_CFLAGS += -fvisibility=hidden -DBORINGSSL_SHARED_LIBRARY -DBORINGSSL_IMPLEMENTATION -Wno-unused-parameter 80# Windows and Macs both have problems with assembly files 81ifneq ($(HOST_OS),linux) 82LOCAL_CFLAGS += -DOPENSSL_NO_ASM 83endif 84include $(LOCAL_PATH)/crypto-sources.mk 85include $(BUILD_HOST_SHARED_LIBRARY) 86 87 88## libssl 89 90# Target static library 91include $(CLEAR_VARS) 92LOCAL_MODULE_TAGS := optional 93LOCAL_MODULE := libssl_static 94LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/src/include 95LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/ssl-sources.mk 96LOCAL_SDK_VERSION := 9 97LOCAL_CFLAGS = -Wno-unused-parameter 98include $(LOCAL_PATH)/ssl-sources.mk 99include $(BUILD_STATIC_LIBRARY) 100 101# Target shared library 102include $(CLEAR_VARS) 103LOCAL_MODULE_TAGS := optional 104LOCAL_MODULE := libssl 105LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/src/include 106LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/ssl-sources.mk 107LOCAL_CFLAGS += -fvisibility=hidden -DBORINGSSL_SHARED_LIBRARY -DBORINGSSL_IMPLEMENTATION -Wno-unused-parameter 108LOCAL_SHARED_LIBRARIES=libcrypto 109LOCAL_SDK_VERSION := 9 110include $(LOCAL_PATH)/ssl-sources.mk 111include $(BUILD_SHARED_LIBRARY) 112 113# Host static library 114include $(CLEAR_VARS) 115LOCAL_MODULE_TAGS := optional 116LOCAL_MODULE := libssl_static-host 117LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/src/include 118LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/ssl-sources.mk 119LOCAL_CFLAGS = -Wno-unused-parameter 120include $(LOCAL_PATH)/ssl-sources.mk 121include $(BUILD_HOST_STATIC_LIBRARY) 122 123# Host shared library 124include $(CLEAR_VARS) 125LOCAL_MODULE_TAGS := optional 126LOCAL_MODULE := libssl-host 127LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/src/include 128LOCAL_MULTILIB := both 129LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/ssl-sources.mk 130LOCAL_CFLAGS += -fvisibility=hidden -DBORINGSSL_SHARED_LIBRARY -DBORINGSSL_IMPLEMENTATION -Wno-unused-parameter 131LOCAL_SHARED_LIBRARIES += libcrypto-host 132include $(LOCAL_PATH)/ssl-sources.mk 133include $(BUILD_HOST_SHARED_LIBRARY) 134