1################################################################################ 2# 3# mmc-utils 4# 5################################################################################ 6 7MMC_UTILS_VERSION = e1281d4de9166b7254ba30bb58f9191fc2c9e7fb 8MMC_UTILS_SITE = https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git 9MMC_UTILS_SITE_METHOD = git 10MMC_UTILS_LICENSE = GPL-2.0 11MMC_UTILS_LICENSE_FILES = README 12 13MMC_UTILS_CFLAGS = $(TARGET_CFLAGS) 14 15ifeq ($(BR2_PACKAGE_MMC_UTILS_ENABLE_DANGEROUS_COMMANDS),y) 16MMC_UTILS_CFLAGS += -DDANGEROUS_COMMANDS_ENABLED 17endif 18 19# override AM_CFLAGS as the project Makefile uses it to pass 20# -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2, and the latter conflicts 21# with the _FORTIFY_SOURCE that we pass when hardening options are 22# enabled. Starting from commit: 23# https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git/commit/?id=958227890690290ee766aaad1b92f3413f67048c 24# they use AM_CFLAGS to set VERSION to first 6 digit of git SHA1, so 25# let's do this here otherwise it won't be automatically set and build 26# will fail 27define MMC_UTILS_BUILD_CMDS 28 $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ 29 CFLAGS="$(MMC_UTILS_CFLAGS)" \ 30 AM_CFLAGS='-DVERSION=\"$(shell echo $(MMC_UTILS_VERSION) | head -c 6)\"' 31endef 32 33define MMC_UTILS_INSTALL_TARGET_CMDS 34 $(MAKE) -C $(@D) prefix=/usr DESTDIR=$(TARGET_DIR) install 35endef 36 37$(eval $(generic-package)) 38