diff options
Diffstat (limited to 'Android.mk')
-rw-r--r-- | Android.mk | 54 |
1 files changed, 31 insertions, 23 deletions
@@ -13,14 +13,10 @@ LOCAL_MODULE := libcrypto_static LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/src/include LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/crypto-sources.mk LOCAL_SDK_VERSION := 9 -LOCAL_CFLAGS = -Wno-unused-parameter +LOCAL_CFLAGS += -fvisibility=hidden -DBORINGSSL_SHARED_LIBRARY -DBORINGSSL_IMPLEMENTATION -Wno-unused-parameter # sha256-armv4.S does not compile with clang. LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as -ifeq ($(TARGET_ARCH),arm64) -ifeq ($(USE_CLANG_PLATFORM_BUILD),true) -LOCAL_ASFLAGS += -march=armv8-a+crypto -endif -endif +LOCAL_CLANG_ASFLAGS_arm64 += -march=armv8-a+crypto include $(LOCAL_PATH)/crypto-sources.mk include $(BUILD_STATIC_LIBRARY) @@ -34,11 +30,7 @@ LOCAL_CFLAGS += -fvisibility=hidden -DBORINGSSL_SHARED_LIBRARY -DBORINGSSL_IMPLE LOCAL_SDK_VERSION := 9 # sha256-armv4.S does not compile with clang. LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as -ifeq ($(TARGET_ARCH),arm64) -ifeq ($(USE_CLANG_PLATFORM_BUILD),true) -LOCAL_ASFLAGS += -march=armv8-a+crypto -endif -endif +LOCAL_CLANG_ASFLAGS_arm64 += -march=armv8-a+crypto include $(LOCAL_PATH)/crypto-sources.mk include $(BUILD_SHARED_LIBRARY) @@ -49,7 +41,7 @@ LOCAL_CPP_EXTENSION := cc LOCAL_MODULE := bssl LOCAL_MODULE_TAGS := optional LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/sources.mk -LOCAL_CFLAGS = -Wno-unused-parameter +LOCAL_CFLAGS += -fvisibility=hidden -DBORINGSSL_SHARED_LIBRARY -DBORINGSSL_IMPLEMENTATION -Wno-unused-parameter LOCAL_SHARED_LIBRARIES=libcrypto libssl include $(LOCAL_PATH)/sources.mk LOCAL_SRC_FILES = $(tool_sources) @@ -57,30 +49,29 @@ include $(BUILD_EXECUTABLE) # Host static library include $(CLEAR_VARS) -LOCAL_MODULE_TAGS := optional +LOCAL_IS_HOST_MODULE := true LOCAL_MODULE := libcrypto_static +LOCAL_MODULE_HOST_OS := darwin linux windows LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/src/include LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/crypto-sources.mk -LOCAL_CFLAGS = -Wno-unused-parameter +LOCAL_CFLAGS += -fvisibility=hidden -DBORINGSSL_SHARED_LIBRARY -DBORINGSSL_IMPLEMENTATION -Wno-unused-parameter # Windows and Macs both have problems with assembly files -ifneq ($(HOST_OS),linux) -LOCAL_CFLAGS += -DOPENSSL_NO_ASM -endif +LOCAL_CFLAGS_darwin += -DOPENSSL_NO_ASM +LOCAL_CFLAGS_windows += -DOPENSSL_NO_ASM include $(LOCAL_PATH)/crypto-sources.mk include $(BUILD_HOST_STATIC_LIBRARY) # Host shared library include $(CLEAR_VARS) -LOCAL_MODULE_TAGS := optional +LOCAL_IS_HOST_MODULE := true LOCAL_MODULE := libcrypto-host LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include LOCAL_MULTILIB := both LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/crypto-sources.mk LOCAL_CFLAGS += -fvisibility=hidden -DBORINGSSL_SHARED_LIBRARY -DBORINGSSL_IMPLEMENTATION -Wno-unused-parameter # Windows and Macs both have problems with assembly files -ifneq ($(HOST_OS),linux) -LOCAL_CFLAGS += -DOPENSSL_NO_ASM -endif +LOCAL_CFLAGS_darwin += -DOPENSSL_NO_ASM +LOCAL_CFLAGS_windows += -DOPENSSL_NO_ASM include $(LOCAL_PATH)/crypto-sources.mk include $(BUILD_HOST_SHARED_LIBRARY) @@ -94,7 +85,7 @@ LOCAL_MODULE := libssl_static LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/src/include LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/ssl-sources.mk LOCAL_SDK_VERSION := 9 -LOCAL_CFLAGS = -Wno-unused-parameter +LOCAL_CFLAGS += -fvisibility=hidden -DBORINGSSL_SHARED_LIBRARY -DBORINGSSL_IMPLEMENTATION -Wno-unused-parameter include $(LOCAL_PATH)/ssl-sources.mk include $(BUILD_STATIC_LIBRARY) @@ -116,10 +107,27 @@ LOCAL_MODULE_TAGS := optional LOCAL_MODULE := libssl_static-host LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/src/include LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/ssl-sources.mk -LOCAL_CFLAGS = -Wno-unused-parameter +LOCAL_CFLAGS += -fvisibility=hidden -DBORINGSSL_SHARED_LIBRARY -DBORINGSSL_IMPLEMENTATION -Wno-unused-parameter include $(LOCAL_PATH)/ssl-sources.mk include $(BUILD_HOST_STATIC_LIBRARY) +# Host static tool (for linux only). +ifeq ($(HOST_OS), linux) +include $(CLEAR_VARS) +LOCAL_CFLAGS += -Wall -Werror -std=c++0x +LOCAL_CPP_EXTENSION := cc +LOCAL_MODULE := bssl +LOCAL_MODULE_TAGS := optional +LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/sources.mk +LOCAL_CFLAGS += -fvisibility=hidden -DBORINGSSL_SHARED_LIBRARY -DBORINGSSL_IMPLEMENTATION -Wno-unused-parameter +LOCAL_SHARED_LIBRARIES=libcrypto-host libssl-host +# Needed for clock_gettime. +LOCAL_LDFLAGS := -lrt +include $(LOCAL_PATH)/sources.mk +LOCAL_SRC_FILES = $(tool_sources) +include $(BUILD_HOST_EXECUTABLE) +endif # HOST_OS == linux + # Host shared library include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional |