kumquat-buildroot/package/nvme/nvme.mk
Samuel Mendoza-Jonas c0293c3cc9 nvme: add optional udev support
Commands like 'nvme list' require libudev but support for libudev is
decided at compile time, and in buildroot this is hard disabled.
Add a check for udev and if it is available build nvme with udev
support.

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
[Thomas:
 - add comment to explain the LIBUDEV variable value
 - use += instead of = to assign <pkg>_MAKE_OPTS.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-04-19 09:33:18 +02:00

33 lines
833 B
Makefile
Executable File

################################################################################
#
# nvme
#
################################################################################
NVME_VERSION = v0.3
NVME_SITE = $(call github,linux-nvme,nvme-cli,$(NVME_VERSION))
NVME_LICENSE = GPLv2+
NVME_LICENSE_FILES = LICENSE
# Yes LIBUDEV=0 means udev support enabled, LIBUDEV=1 means udev
# support disabled.
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
NVME_DEPENDENCIES += udev
NVME_MAKE_OPTS += LIBUDEV=0
else
NVME_MAKE_OPTS += LIBUDEV=1
endif
# LIBUDEV=1 means that libudev is _disabled_
define NVME_BUILD_CMDS
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \
$(NVME_MAKE_OPTS) -C $(@D)
endef
define NVME_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) \
PREFIX=/usr install-bin
endef
$(eval $(generic-package))