2016-03-17 16:03:55 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# cryptopp
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2021-09-24 18:28:44 +02:00
|
|
|
CRYPTOPP_VERSION = 8.6.0
|
2016-03-17 16:03:55 +01:00
|
|
|
CRYPTOPP_SOURCE = cryptopp$(subst .,,$(CRYPTOPP_VERSION)).zip
|
2018-12-12 03:55:11 +01:00
|
|
|
CRYPTOPP_SITE = https://cryptopp.com
|
2019-03-08 23:15:34 +01:00
|
|
|
CRYPTOPP_LICENSE = BSL-1.0, BSD-3-Clause (CRYPTOGAMS), Public domain (ChaCha SSE2 and AVX)
|
2016-03-17 16:03:55 +01:00
|
|
|
CRYPTOPP_LICENSE_FILES = License.txt
|
2021-02-06 16:43:48 +01:00
|
|
|
CRYPTOPP_CPE_ID_VENDOR = cryptopp
|
|
|
|
CRYPTOPP_CPE_ID_PRODUCT = crypto\+\+
|
2016-03-17 16:03:55 +01:00
|
|
|
CRYPTOPP_INSTALL_STAGING = YES
|
|
|
|
|
|
|
|
define HOST_CRYPTOPP_EXTRACT_CMDS
|
2018-04-02 20:36:23 +02:00
|
|
|
$(UNZIP) $(HOST_CRYPTOPP_DL_DIR)/$(CRYPTOPP_SOURCE) -d $(@D)
|
2016-03-17 16:03:55 +01:00
|
|
|
endef
|
|
|
|
|
2019-04-27 19:46:04 +02:00
|
|
|
HOST_CRYPTOPP_CXXFLAGS = $(HOST_CFLAGS) -fPIC
|
|
|
|
|
2019-05-06 22:24:02 +02:00
|
|
|
# _mm256_broadcastsi128_si256 has been added only in gcc 4.9
|
2019-04-27 19:46:04 +02:00
|
|
|
ifneq ($(BR2_HOST_GCC_AT_LEAST_4_9),y)
|
|
|
|
HOST_CRYPTOPP_CXXFLAGS += -DCRYPTOPP_DISABLE_AVX2
|
|
|
|
endif
|
|
|
|
|
2016-03-17 16:03:55 +01:00
|
|
|
HOST_CRYPTOPP_MAKE_OPTS = \
|
|
|
|
$(HOST_CONFIGURE_OPTS) \
|
2019-04-27 19:46:04 +02:00
|
|
|
CXXFLAGS="$(HOST_CRYPTOPP_CXXFLAGS)"
|
2016-03-17 16:03:55 +01:00
|
|
|
|
|
|
|
define HOST_CRYPTOPP_BUILD_CMDS
|
2016-10-28 15:18:19 +02:00
|
|
|
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_CRYPTOPP_MAKE_OPTS) shared
|
2016-03-17 16:03:55 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_CRYPTOPP_INSTALL_CMDS
|
2019-03-09 15:30:19 +01:00
|
|
|
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) PREFIX=$(HOST_DIR) install-lib
|
2016-03-17 16:03:55 +01:00
|
|
|
endef
|
|
|
|
|
2020-07-28 11:53:46 +02:00
|
|
|
define CRYPTOPP_EXTRACT_CMDS
|
|
|
|
$(UNZIP) $(CRYPTOPP_DL_DIR)/$(CRYPTOPP_SOURCE) -d $(@D)
|
|
|
|
endef
|
|
|
|
|
|
|
|
CRYPTOPP_CXXFLAGS = $(TARGET_CXXFLAGS) -fPIC
|
|
|
|
|
|
|
|
# _mm256_broadcastsi128_si256 has been added only in gcc 4.9
|
|
|
|
ifneq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_9),y)
|
|
|
|
CRYPTOPP_CXXFLAGS += -DCRYPTOPP_DISABLE_AVX2
|
|
|
|
endif
|
|
|
|
|
2022-02-05 14:58:06 +01:00
|
|
|
ifneq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y)
|
|
|
|
CRYPTOPP_CXXFLAGS += -DCRYPTOPP_DISABLE_ALTIVEC
|
|
|
|
endif
|
|
|
|
|
2022-01-10 18:36:40 +01:00
|
|
|
ifneq ($(BR2_ARM_CPU_HAS_NEON),y)
|
|
|
|
CRYPTOPP_CXXFLAGS += -DCRYPTOPP_DISABLE_ARM_NEON
|
|
|
|
endif
|
|
|
|
|
2020-07-28 11:53:46 +02:00
|
|
|
CRYPTOPP_MAKE_OPTS = \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
CXXFLAGS="$(CRYPTOPP_CXXFLAGS)"
|
|
|
|
|
|
|
|
define CRYPTOPP_BUILD_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(CRYPTOPP_MAKE_OPTS) \
|
|
|
|
PREFIX=/usr shared libcryptopp.pc
|
|
|
|
endef
|
|
|
|
|
|
|
|
define CRYPTOPP_INSTALL_TARGET_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) PREFIX=/usr DESTDIR=$(TARGET_DIR) \
|
|
|
|
LDCONFIG=/bin/true install-lib
|
|
|
|
endef
|
|
|
|
|
|
|
|
define CRYPTOPP_INSTALL_STAGING_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) PREFIX=/usr DESTDIR=$(STAGING_DIR) \
|
|
|
|
LDCONFIG=/bin/true install-lib
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|
2016-03-17 16:03:55 +01:00
|
|
|
$(eval $(host-generic-package))
|