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