xref: /freebsd/sys/contrib/openzfs/cmd/Makefile.am (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1bin_SCRIPTS =
2bin_PROGRAMS =
3sbin_SCRIPTS =
4sbin_PROGRAMS =
5dist_bin_SCRIPTS =
6zfsexec_PROGRAMS =
7mounthelper_PROGRAMS =
8
9
10sbin_SCRIPTS      += fsck.zfs
11SHELLCHECKSCRIPTS += fsck.zfs
12CLEANFILES        += fsck.zfs
13dist_noinst_DATA  += %D%/fsck.zfs.in
14$(call SUBST,fsck.zfs,%D%/)
15
16
17sbin_PROGRAMS   += zfs_ids_to_path
18CPPCHECKTARGETS += zfs_ids_to_path
19
20zfs_ids_to_path_SOURCES = \
21	%D%/zfs_ids_to_path.c
22
23zfs_ids_to_path_LDADD = \
24	libzfs.la
25
26
27zhack_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
28
29sbin_PROGRAMS   += zhack
30CPPCHECKTARGETS += zhack
31
32zhack_SOURCES = \
33	%D%/zhack.c
34
35zhack_LDADD = \
36	libzpool.la \
37	libzfs_core.la \
38	libnvpair.la
39
40
41ztest_CFLAGS    = $(AM_CFLAGS) $(KERNEL_CFLAGS)
42ztest_CPPFLAGS  = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
43
44sbin_PROGRAMS   += ztest
45CPPCHECKTARGETS += ztest
46
47ztest_SOURCES = \
48	%D%/ztest.c
49
50ztest_LDADD = \
51	libzpool.la \
52	libzfs_core.la \
53	libnvpair.la
54
55ztest_LDADD += -lm
56ztest_LDFLAGS = -pthread
57
58
59include $(srcdir)/%D%/raidz_test/Makefile.am
60include $(srcdir)/%D%/zdb/Makefile.am
61include $(srcdir)/%D%/zfs/Makefile.am
62include $(srcdir)/%D%/zinject/Makefile.am
63include $(srcdir)/%D%/zpool/Makefile.am
64include $(srcdir)/%D%/zpool_influxdb/Makefile.am
65include $(srcdir)/%D%/zstream/Makefile.am
66
67
68if BUILD_LINUX
69mounthelper_PROGRAMS += mount.zfs
70CPPCHECKTARGETS      += mount.zfs
71
72mount_zfs_SOURCES = \
73	%D%/mount_zfs.c
74
75mount_zfs_LDADD = \
76	libzfs.la \
77	libzfs_core.la \
78	libnvpair.la
79
80mount_zfs_LDADD += $(LTLIBINTL)
81
82CPPCHECKTARGETS += raidz_test
83
84
85sbin_PROGRAMS   += zgenhostid
86CPPCHECKTARGETS += zgenhostid
87
88zgenhostid_SOURCES = \
89	%D%/zgenhostid.c
90
91
92dist_bin_SCRIPTS  += %D%/zvol_wait
93SHELLCHECKSCRIPTS += %D%/zvol_wait
94
95
96include $(srcdir)/%D%/zed/Makefile.am
97endif
98
99
100if USING_PYTHON
101bin_SCRIPTS      += arc_summary     arcstat        dbufstat        zilstat
102CLEANFILES       += arc_summary     arcstat        dbufstat        zilstat
103dist_noinst_DATA += %D%/arc_summary %D%/arcstat.in %D%/dbufstat.in %D%/zilstat.in
104
105$(call SUBST,arcstat,%D%/)
106$(call SUBST,dbufstat,%D%/)
107$(call SUBST,zilstat,%D%/)
108arc_summary: %D%/arc_summary
109	$(AM_V_at)cp $< $@
110endif
111
112
113PHONY += cmd
114cmd: $(bin_SCRIPTS) $(bin_PROGRAMS) $(sbin_SCRIPTS) $(sbin_PROGRAMS) $(dist_bin_SCRIPTS) $(zfsexec_PROGRAMS) $(mounthelper_PROGRAMS)
115