xref: /freebsd/sys/contrib/openzfs/cmd/Makefile.am (revision 7ef62cebc2f965b0f640263e179276928885e33d)
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) $(FORCEDEBUG_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)
42# Get rid of compiler warning for unchecked truncating snprintfs on gcc 7.1.1
43ztest_CFLAGS   += $(NO_FORMAT_TRUNCATION)
44ztest_CPPFLAGS  = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
45
46sbin_PROGRAMS   += ztest
47CPPCHECKTARGETS += ztest
48
49ztest_SOURCES = \
50	%D%/ztest.c
51
52ztest_LDADD = \
53	libzpool.la \
54	libzfs_core.la \
55	libnvpair.la
56
57ztest_LDADD += -lm
58ztest_LDFLAGS = -pthread
59
60
61include $(srcdir)/%D%/raidz_test/Makefile.am
62include $(srcdir)/%D%/zdb/Makefile.am
63include $(srcdir)/%D%/zfs/Makefile.am
64include $(srcdir)/%D%/zinject/Makefile.am
65include $(srcdir)/%D%/zpool/Makefile.am
66include $(srcdir)/%D%/zpool_influxdb/Makefile.am
67include $(srcdir)/%D%/zstream/Makefile.am
68
69
70if BUILD_LINUX
71mounthelper_PROGRAMS += mount.zfs
72CPPCHECKTARGETS      += mount.zfs
73
74mount_zfs_SOURCES = \
75	%D%/mount_zfs.c
76
77mount_zfs_LDADD = \
78	libzfs.la \
79	libzfs_core.la \
80	libnvpair.la
81
82mount_zfs_LDADD += $(LTLIBINTL)
83
84CPPCHECKTARGETS += raidz_test
85
86
87sbin_PROGRAMS   += zgenhostid
88CPPCHECKTARGETS += zgenhostid
89
90zgenhostid_SOURCES = \
91	%D%/zgenhostid.c
92
93
94dist_bin_SCRIPTS  += %D%/zvol_wait
95SHELLCHECKSCRIPTS += %D%/zvol_wait
96
97
98include $(srcdir)/%D%/zed/Makefile.am
99endif
100
101
102if USING_PYTHON
103bin_SCRIPTS      += arc_summary     arcstat        dbufstat        zilstat
104CLEANFILES       += arc_summary     arcstat        dbufstat        zilstat
105dist_noinst_DATA += %D%/arc_summary %D%/arcstat.in %D%/dbufstat.in %D%/zilstat.in
106
107$(call SUBST,arcstat,%D%/)
108$(call SUBST,dbufstat,%D%/)
109$(call SUBST,zilstat,%D%/)
110arc_summary: %D%/arc_summary
111	$(AM_V_at)cp $< $@
112endif
113
114
115PHONY += cmd
116cmd: $(bin_SCRIPTS) $(bin_PROGRAMS) $(sbin_SCRIPTS) $(sbin_PROGRAMS) $(dist_bin_SCRIPTS) $(zfsexec_PROGRAMS) $(mounthelper_PROGRAMS)
117