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