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