2019-11-21 09:12:23 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# libargon2
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2020-02-15 11:02:47 +01:00
|
|
|
LIBARGON2_VERSION = 20190702
|
2019-11-21 09:12:23 +01:00
|
|
|
LIBARGON2_SITE = $(call github,P-H-C,phc-winner-argon2,$(LIBARGON2_VERSION))
|
|
|
|
LIBARGON2_LICENSE = CC0-1.0 or Apache-2.0
|
|
|
|
LIBARGON2_LICENSE_FILES = LICENSE
|
|
|
|
LIBARGON2_INSTALL_STAGING = YES
|
|
|
|
|
2020-02-15 11:02:47 +01:00
|
|
|
LIBARGON2_OPTS = LIBRARY_REL=lib
|
|
|
|
|
2019-11-21 09:12:23 +01:00
|
|
|
# GCC_TARGET_ARCH is not defined for all architectures, but libargon2
|
|
|
|
# only uses it to detect if some x86 optimizations can be used, and
|
|
|
|
# GCC_TARGET_ARCH is defined on x86.
|
|
|
|
ifneq ($(GCC_TARGET_ARCH),)
|
2020-02-15 11:02:47 +01:00
|
|
|
LIBARGON2_OPTS += OPTTARGET=$(GCC_TARGET_ARCH)
|
2019-11-21 09:12:23 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
|
|
|
|
LIBARGON2_OPTS += NO_THREADS=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
define LIBARGON2_BUILD_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
|
|
|
|
$(LIBARGON2_OPTS)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define LIBARGON2_INSTALL_STAGING_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
|
2020-02-15 11:02:47 +01:00
|
|
|
$(LIBARGON2_OPTS) DESTDIR=$(STAGING_DIR) install
|
2019-11-21 09:12:23 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define LIBARGON2_INSTALL_TARGET_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
|
2020-02-15 11:02:47 +01:00
|
|
|
$(LIBARGON2_OPTS) DESTDIR=$(TARGET_DIR) install
|
2019-11-21 09:12:23 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|