summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2021-03-18 17:12:35 +0100
committerJes Sorensen <jsorensen@fb.com>2021-03-19 13:31:11 +0100
commitaf3396dadfcd3b13480d021b8d3645c6d2420f79 (patch)
tree1f18fca15c4145fd08eb854844a026c8b2d67b9f /Makefile
parentimsm: support for third Sata controller (diff)
downloadmdadm-af3396dadfcd3b13480d021b8d3645c6d2420f79.tar.xz
mdadm-af3396dadfcd3b13480d021b8d3645c6d2420f79.zip
Monitor: make libudev dependency optional
Make -ludev configurable, enabled by default. To disable it, -DNO_LIBUDEV has to be set explicitly in CXFALGS. This patch restores commit cab9c67d461c ("mdmonitor: set small delay once") for configuration without libudev to bring minimal support in such case. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 1e6e1e12..2a51d813 100644
--- a/Makefile
+++ b/Makefile
@@ -119,7 +119,12 @@ endif
# If you want a static binary, you might uncomment these
# LDFLAGS = -static
# STRIP = -s
-LDLIBS=-ldl -ludev
+LDLIBS = -ldl
+
+# To explicitly disable libudev, set -DNO_LIBUDEV in CXFLAGS
+ifeq (, $(findstring -DNO_LIBUDEV, $(CXFLAGS)))
+ LDLIBS += -ludev
+endif
INSTALL = /usr/bin/install
DESTDIR =