summaryrefslogtreecommitdiffstats
path: root/lib/libzutil/Makefile.am
blob: 0bc29f05e0fb27ed8eaf9298e38916c2fd123f65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
include $(top_srcdir)/config/Rules.am

# Suppress unused but set variable warnings often due to ASSERTs
AM_CFLAGS += $(NO_UNUSED_BUT_SET_VARIABLE)
AM_CFLAGS += $(LIBBLKID_CFLAGS) $(LIBUDEV_CFLAGS)
AM_CFLAGS += -fvisibility=hidden

DEFAULT_INCLUDES += -I$(srcdir)

noinst_LTLIBRARIES = libzutil.la

USER_C = \
	zutil_device_path.c \
	zutil_import.c \
	zutil_import.h \
	zutil_nicenum.c \
	zutil_pool.c

if BUILD_LINUX
USER_C += \
	os/linux/zutil_device_path_os.c \
	os/linux/zutil_import_os.c \
	os/linux/zutil_compat.c
endif

if BUILD_FREEBSD
DEFAULT_INCLUDES += -I$(top_srcdir)/include/os/freebsd/zfs

USER_C += \
	os/freebsd/zutil_device_path_os.c \
	os/freebsd/zutil_import_os.c \
	os/freebsd/zutil_compat.c

VPATH += $(top_srcdir)/module/os/freebsd/zfs

nodist_libzutil_la_SOURCES = zfs_ioctl_compat.c
endif

libzutil_la_SOURCES = $(USER_C)

libzutil_la_LIBADD = \
	$(abs_top_builddir)/lib/libavl/libavl.la \
	$(abs_top_builddir)/lib/libtpool/libtpool.la \
	$(abs_top_builddir)/lib/libnvpair/libnvpair.la \
	$(abs_top_builddir)/lib/libspl/libspl.la

if BUILD_LINUX
libzutil_la_LIBADD += \
	$(abs_top_builddir)/lib/libefi/libefi.la \
	-lrt
endif

libzutil_la_LIBADD += -lm $(LIBBLKID_LIBS) $(LIBUDEV_LIBS)

include $(top_srcdir)/config/CppCheck.am