1include $(top_srcdir)/config/Rules.am 2 3VPATH = \ 4 $(top_srcdir)/module/zfs \ 5 $(top_srcdir)/module/zcommon \ 6 $(top_srcdir)/module/lua \ 7 $(top_srcdir)/module/os/linux/zfs \ 8 $(top_srcdir)/lib/libzpool 9 10if BUILD_FREEBSD 11DEFAULT_INCLUDES += -I$(top_srcdir)/include/os/freebsd/zfs 12endif 13if BUILD_LINUX 14DEFAULT_INCLUDES += -I$(top_srcdir)/include/os/linux/zfs 15endif 16 17# Unconditionally enable debugging for libzpool 18AM_CPPFLAGS += -DDEBUG -UNDEBUG -DZFS_DEBUG 19 20# Suppress unused but set variable warnings often due to ASSERTs 21AM_CFLAGS += $(NO_UNUSED_BUT_SET_VARIABLE) 22 23# Includes kernel code generate warnings for large stack frames 24AM_CFLAGS += $(FRAME_LARGER_THAN) 25 26AM_CFLAGS += $(ZLIB_CFLAGS) 27 28AM_CFLAGS += -DLIB_ZPOOL_BUILD 29 30lib_LTLIBRARIES = libzpool.la 31 32USER_C = \ 33 kernel.c \ 34 taskq.c \ 35 util.c 36 37KERNEL_C = \ 38 zfeature_common.c \ 39 zfs_comutil.c \ 40 zfs_deleg.c \ 41 zfs_fletcher.c \ 42 zfs_fletcher_aarch64_neon.c \ 43 zfs_fletcher_avx512.c \ 44 zfs_fletcher_intel.c \ 45 zfs_fletcher_sse.c \ 46 zfs_fletcher_superscalar.c \ 47 zfs_fletcher_superscalar4.c \ 48 zfs_namecheck.c \ 49 zfs_prop.c \ 50 zpool_prop.c \ 51 zprop_common.c \ 52 abd.c \ 53 abd_os.c \ 54 aggsum.c \ 55 arc.c \ 56 arc_os.c \ 57 blkptr.c \ 58 bplist.c \ 59 bpobj.c \ 60 bptree.c \ 61 bqueue.c \ 62 btree.c \ 63 cityhash.c \ 64 dbuf.c \ 65 dbuf_stats.c \ 66 ddt.c \ 67 ddt_zap.c \ 68 dmu.c \ 69 dmu_diff.c \ 70 dmu_object.c \ 71 dmu_objset.c \ 72 dmu_recv.c \ 73 dmu_redact.c \ 74 dmu_send.c \ 75 dmu_traverse.c \ 76 dmu_tx.c \ 77 dmu_zfetch.c \ 78 dnode.c \ 79 dnode_sync.c \ 80 dsl_bookmark.c \ 81 dsl_crypt.c \ 82 dsl_dataset.c \ 83 dsl_deadlist.c \ 84 dsl_deleg.c \ 85 dsl_destroy.c \ 86 dsl_dir.c \ 87 dsl_pool.c \ 88 dsl_prop.c \ 89 dsl_scan.c \ 90 dsl_synctask.c \ 91 dsl_userhold.c \ 92 edonr_zfs.c \ 93 fm.c \ 94 gzip.c \ 95 hkdf.c \ 96 lz4.c \ 97 lz4_zfs.c \ 98 lzjb.c \ 99 metaslab.c \ 100 mmp.c \ 101 multilist.c \ 102 objlist.c \ 103 pathname.c \ 104 range_tree.c \ 105 refcount.c \ 106 rrwlock.c \ 107 sa.c \ 108 sha256.c \ 109 skein_zfs.c \ 110 spa.c \ 111 spa_boot.c \ 112 spa_checkpoint.c \ 113 spa_config.c \ 114 spa_errlog.c \ 115 spa_history.c \ 116 spa_log_spacemap.c \ 117 spa_misc.c \ 118 spa_stats.c \ 119 space_map.c \ 120 space_reftree.c \ 121 trace.c \ 122 txg.c \ 123 uberblock.c \ 124 unique.c \ 125 vdev.c \ 126 vdev_cache.c \ 127 vdev_draid.c \ 128 vdev_draid_rand.c \ 129 vdev_file.c \ 130 vdev_indirect.c \ 131 vdev_indirect_births.c \ 132 vdev_indirect_mapping.c \ 133 vdev_initialize.c \ 134 vdev_label.c \ 135 vdev_mirror.c \ 136 vdev_missing.c \ 137 vdev_queue.c \ 138 vdev_raidz.c \ 139 vdev_raidz_math.c \ 140 vdev_raidz_math_aarch64_neon.c \ 141 vdev_raidz_math_aarch64_neonx2.c \ 142 vdev_raidz_math_avx2.c \ 143 vdev_raidz_math_avx512bw.c \ 144 vdev_raidz_math_avx512f.c \ 145 vdev_raidz_math_powerpc_altivec.c \ 146 vdev_raidz_math_scalar.c \ 147 vdev_raidz_math_sse2.c \ 148 vdev_raidz_math_ssse3.c \ 149 vdev_rebuild.c \ 150 vdev_removal.c \ 151 vdev_root.c \ 152 vdev_trim.c \ 153 zap.c \ 154 zap_leaf.c \ 155 zap_micro.c \ 156 zcp.c \ 157 zcp_get.c \ 158 zcp_global.c \ 159 zcp_iter.c \ 160 zcp_set.c \ 161 zcp_synctask.c \ 162 zfeature.c \ 163 zfs_byteswap.c \ 164 zfs_debug.c \ 165 zfs_fm.c \ 166 zfs_fuid.c \ 167 zfs_racct.c \ 168 zfs_sa.c \ 169 zfs_ratelimit.c \ 170 zfs_rlock.c \ 171 zfs_znode.c \ 172 zil.c \ 173 zio.c \ 174 zio_checksum.c \ 175 zio_compress.c \ 176 zio_crypt.c \ 177 zio_inject.c \ 178 zle.c \ 179 zrlock.c \ 180 zthr.c 181 182LUA_C = \ 183 lapi.c \ 184 lauxlib.c \ 185 lbaselib.c \ 186 lcode.c \ 187 lcompat.c \ 188 lcorolib.c \ 189 lctype.c \ 190 ldebug.c \ 191 ldo.c \ 192 lfunc.c \ 193 lgc.c \ 194 llex.c \ 195 lmem.c \ 196 lobject.c \ 197 lopcodes.c \ 198 lparser.c \ 199 lstate.c \ 200 lstring.c \ 201 lstrlib.c \ 202 ltable.c \ 203 ltablib.c \ 204 ltm.c \ 205 lvm.c \ 206 lzio.c 207 208dist_libzpool_la_SOURCES = \ 209 $(USER_C) 210 211nodist_libzpool_la_SOURCES = \ 212 $(KERNEL_C) \ 213 $(LUA_C) 214 215libzpool_la_LIBADD = \ 216 $(abs_top_builddir)/lib/libicp/libicp.la \ 217 $(abs_top_builddir)/lib/libunicode/libunicode.la \ 218 $(abs_top_builddir)/lib/libnvpair/libnvpair.la \ 219 $(abs_top_builddir)/lib/libzstd/libzstd.la \ 220 $(abs_top_builddir)/lib/libzutil/libzutil.la 221 222libzpool_la_LIBADD += $(LIBCLOCK_GETTIME) $(ZLIB_LIBS) -ldl -lm 223 224libzpool_la_LDFLAGS = -pthread 225 226if !ASAN_ENABLED 227libzpool_la_LDFLAGS += -Wl,-z,defs 228endif 229 230if BUILD_FREEBSD 231libzpool_la_LIBADD += -lgeom 232endif 233 234libzpool_la_LDFLAGS += -version-info 5:0:0 235 236if TARGET_CPU_POWERPC 237vdev_raidz_math_powerpc_altivec.$(OBJEXT): CFLAGS += -maltivec 238vdev_raidz_math_powerpc_altivec.l$(OBJEXT): CFLAGS += -maltivec 239endif 240 241include $(top_srcdir)/config/CppCheck.am 242