aboutsummaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorGravatar Samuel Mendoza-Jonas <sam@mendozajonas.com>2016-04-19 11:54:24 +1000
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-04-19 09:33:18 +0200
commitc0293c3cc9f99b81c78ed193a7ce6187c6c4c78d (patch)
tree2da732513620e0ff423d47a4145f41549882588b /package
parentbabf1190b3ef0dac15a99c862c814e916d32d819 (diff)
downloadbuildroot-c0293c3cc9f99b81c78ed193a7ce6187c6c4c78d.tar.gz
buildroot-c0293c3cc9f99b81c78ed193a7ce6187c6c4c78d.tar.bz2
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>
Diffstat (limited to 'package')
-rwxr-xr-xpackage/nvme/nvme.mk11
1 files changed, 10 insertions, 1 deletions
diff --git a/package/nvme/nvme.mk b/package/nvme/nvme.mk
index 7c4bd8eb07..b745025fdf 100755
--- a/package/nvme/nvme.mk
+++ b/package/nvme/nvme.mk
@@ -9,10 +9,19 @@ 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) \
- LIBUDEV=1 -C $(@D)
+ $(NVME_MAKE_OPTS) -C $(@D)
endef
define NVME_INSTALL_TARGET_CMDS