mirror_zfs/tests/zfs-tests/cmd/devname2devid/Makefile.am
Ryan Moeller 0c79b070a7
ZTS: Fix devname2devid build on FreeBSD with libudev
When libudev is installed on FreeBSD, configure finds it and sets
WANT_DEVNAME2DEVID, but it isn't found by the linker because we
didn't specify where it is.

Use LIBUDEV_LIBS so the location of the library gets added to the
linker flags for devname2devid.
Also use LIBUDEV_CFLAGS here in case some other platform needs it.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #10590
2020-07-22 10:49:22 -07:00

11 lines
281 B
Makefile

include $(top_srcdir)/config/Rules.am
pkgexecdir = $(datadir)/@PACKAGE@/zfs-tests/bin
if WANT_DEVNAME2DEVID
pkgexec_PROGRAMS = devname2devid
devname2devid_SOURCES = devname2devid.c
devname2devid_CFLAGS = $(AM_CFLAGS) $(LIBUDEV_CFLAGS)
devname2devid_LDADD = $(LIBUDEV_LIBS)
endif