1include $(top_srcdir)/config/Rules.am 2 3AM_CFLAGS += $(LIBBLKID_CFLAGS) $(LIBUUID_CFLAGS) 4 5DEFAULT_INCLUDES += -I$(srcdir) 6 7sbin_PROGRAMS = zpool 8 9zpool_SOURCES = \ 10 zpool_iter.c \ 11 zpool_main.c \ 12 zpool_util.c \ 13 zpool_util.h \ 14 zpool_vdev.c 15 16if BUILD_FREEBSD 17zpool_SOURCES += os/freebsd/zpool_vdev_os.c 18endif 19 20if BUILD_LINUX 21zpool_SOURCES += os/linux/zpool_vdev_os.c 22endif 23 24zpool_LDADD = \ 25 $(abs_top_builddir)/lib/libzfs/libzfs.la \ 26 $(abs_top_builddir)/lib/libzfs_core/libzfs_core.la \ 27 $(abs_top_builddir)/lib/libnvpair/libnvpair.la \ 28 $(abs_top_builddir)/lib/libuutil/libuutil.la 29 30zpool_LDADD += $(LTLIBINTL) 31 32if BUILD_FREEBSD 33zpool_LDADD += -lgeom 34endif 35zpool_LDADD += -lm $(LIBBLKID_LIBS) $(LIBUUID_LIBS) 36 37include $(top_srcdir)/config/CppCheck.am 38 39zpoolconfdir = $(sysconfdir)/zfs/zpool.d 40zpoolexecdir = $(zfsexecdir)/zpool.d 41 42EXTRA_DIST = zpool.d/README compatibility.d 43 44dist_zpoolexec_SCRIPTS = \ 45 zpool.d/dm-deps \ 46 zpool.d/enc \ 47 zpool.d/encdev \ 48 zpool.d/fault_led \ 49 zpool.d/iostat \ 50 zpool.d/iostat-1s \ 51 zpool.d/iostat-10s \ 52 zpool.d/label \ 53 zpool.d/locate_led \ 54 zpool.d/lsblk \ 55 zpool.d/media \ 56 zpool.d/model \ 57 zpool.d/serial \ 58 zpool.d/ses \ 59 zpool.d/size \ 60 zpool.d/slot \ 61 zpool.d/smart \ 62 zpool.d/smartx \ 63 zpool.d/temp \ 64 zpool.d/health \ 65 zpool.d/r_proc \ 66 zpool.d/w_proc \ 67 zpool.d/r_ucor \ 68 zpool.d/w_ucor \ 69 zpool.d/nonmed \ 70 zpool.d/defect \ 71 zpool.d/hours_on \ 72 zpool.d/realloc \ 73 zpool.d/rep_ucor \ 74 zpool.d/cmd_to \ 75 zpool.d/pend_sec \ 76 zpool.d/off_ucor \ 77 zpool.d/ata_err \ 78 zpool.d/nvme_err \ 79 zpool.d/pwr_cyc \ 80 zpool.d/upath \ 81 zpool.d/vendor \ 82 zpool.d/smart_test \ 83 zpool.d/test_type \ 84 zpool.d/test_status \ 85 zpool.d/test_progress \ 86 zpool.d/test_ended 87 88zpoolconfdefaults = \ 89 dm-deps \ 90 enc \ 91 encdev \ 92 fault_led \ 93 iostat \ 94 iostat-1s \ 95 iostat-10s \ 96 label \ 97 locate_led \ 98 lsblk \ 99 media \ 100 model \ 101 serial \ 102 ses \ 103 size \ 104 slot \ 105 smart \ 106 smartx \ 107 temp \ 108 health \ 109 r_proc \ 110 w_proc \ 111 r_ucor \ 112 w_ucor \ 113 nonmed \ 114 defect \ 115 hours_on \ 116 realloc \ 117 rep_ucor \ 118 cmd_to \ 119 pend_sec \ 120 off_ucor \ 121 ata_err \ 122 nvme_err \ 123 pwr_cyc \ 124 upath \ 125 vendor \ 126 smart_test \ 127 test_type \ 128 test_status \ 129 test_progress \ 130 test_ended 131 132zpoolcompatdir = $(pkgdatadir)/compatibility.d 133 134dist_zpoolcompat_DATA = \ 135 compatibility.d/compat-2018 \ 136 compatibility.d/compat-2019 \ 137 compatibility.d/compat-2020 \ 138 compatibility.d/compat-2021 \ 139 compatibility.d/freebsd-11.0 \ 140 compatibility.d/freebsd-11.2 \ 141 compatibility.d/freebsd-11.3 \ 142 compatibility.d/freenas-9.10.2 \ 143 compatibility.d/grub2 \ 144 compatibility.d/openzfsonosx-1.7.0 \ 145 compatibility.d/openzfsonosx-1.8.1 \ 146 compatibility.d/openzfsonosx-1.9.3 \ 147 compatibility.d/openzfs-2.0-freebsd \ 148 compatibility.d/openzfs-2.0-linux \ 149 compatibility.d/zol-0.6.5 \ 150 compatibility.d/zol-0.7 \ 151 compatibility.d/zol-0.8 152 153# canonical <- alias symbolic link pairs 154# eg: "2018" is a link to "compat-2018" 155zpoolcompatlinks = \ 156 "compat-2018 2018" \ 157 "compat-2019 2019" \ 158 "compat-2020 2020" \ 159 "compat-2021 2021" \ 160 "freebsd-11.0 freebsd-11.1" \ 161 "freebsd-11.0 freenas-11.0" \ 162 "freebsd-11.2 freenas-11.2" \ 163 "freebsd-11.3 freebsd-11.4" \ 164 "freebsd-11.3 freebsd-12.0" \ 165 "freebsd-11.3 freebsd-12.1" \ 166 "freebsd-11.3 freebsd-12.2" \ 167 "freebsd-11.3 freenas-11.3" \ 168 "freenas-11.0 freenas-11.1" \ 169 "openzfsonosx-1.9.3 openzfsonosx-1.9.4" \ 170 "openzfs-2.0-freebsd truenas-12.0" \ 171 "zol-0.7 ubuntu-18.04" \ 172 "zol-0.8 ubuntu-20.04" 173 174install-data-hook: 175 $(MKDIR_P) "$(DESTDIR)$(zpoolconfdir)" 176 for f in $(zpoolconfdefaults); do \ 177 test -f "$(DESTDIR)$(zpoolconfdir)/$${f}" -o \ 178 -L "$(DESTDIR)$(zpoolconfdir)/$${f}" || \ 179 ln -s "$(zpoolexecdir)/$${f}" "$(DESTDIR)$(zpoolconfdir)"; \ 180 done 181 for l in $(zpoolcompatlinks); do \ 182 (cd "$(DESTDIR)$(zpoolcompatdir)"; ln -s $${l} ); \ 183 done 184