xref: /freebsd/sys/contrib/openzfs/lib/libzpool/Makefile.am (revision 3332f1b444d4a73238e9f59cca27bfc95fe936bd)
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	btree.c \
62	bqueue.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_dataset.c \
82	dsl_deadlist.c \
83	dsl_deleg.c \
84	dsl_dir.c \
85	dsl_crypt.c \
86	dsl_pool.c \
87	dsl_prop.c \
88	dsl_scan.c \
89	dsl_synctask.c \
90	dsl_destroy.c \
91	dsl_userhold.c \
92	edonr_zfs.c \
93	hkdf.c \
94	fm.c \
95	gzip.c \
96	lzjb.c \
97	lz4.c \
98	metaslab.c \
99	mmp.c \
100	multilist.c \
101	objlist.c \
102	pathname.c \
103	range_tree.c \
104	refcount.c \
105	rrwlock.c \
106	sa.c \
107	sha256.c \
108	skein_zfs.c \
109	spa.c \
110	spa_boot.c \
111	spa_checkpoint.c \
112	spa_config.c \
113	spa_errlog.c \
114	spa_history.c \
115	spa_log_spacemap.c \
116	spa_misc.c \
117	spa_stats.c \
118	space_map.c \
119	space_reftree.c \
120	txg.c \
121	trace.c \
122	uberblock.c \
123	unique.c \
124	vdev.c \
125	vdev_cache.c \
126	vdev_draid.c \
127	vdev_draid_rand.c \
128	vdev_file.c \
129	vdev_indirect_births.c \
130	vdev_indirect.c \
131	vdev_indirect_mapping.c \
132	vdev_initialize.c \
133	vdev_label.c \
134	vdev_mirror.c \
135	vdev_missing.c \
136	vdev_queue.c \
137	vdev_raidz.c \
138	vdev_raidz_math_aarch64_neon.c \
139	vdev_raidz_math_aarch64_neonx2.c \
140	vdev_raidz_math_avx2.c \
141	vdev_raidz_math_avx512bw.c \
142	vdev_raidz_math_avx512f.c \
143	vdev_raidz_math.c \
144	vdev_raidz_math_scalar.c \
145	vdev_raidz_math_sse2.c \
146	vdev_raidz_math_ssse3.c \
147	vdev_raidz_math_powerpc_altivec.c \
148	vdev_rebuild.c \
149	vdev_removal.c \
150	vdev_root.c \
151	vdev_trim.c \
152	zap.c \
153	zap_leaf.c \
154	zap_micro.c \
155	zcp.c \
156	zcp_get.c \
157	zcp_global.c \
158	zcp_iter.c \
159	zcp_set.c \
160	zcp_synctask.c \
161	zfeature.c \
162	zfs_byteswap.c \
163	zfs_debug.c \
164	zfs_fm.c \
165	zfs_fuid.c \
166	zfs_racct.c \
167	zfs_sa.c \
168	zfs_znode.c \
169	zfs_ratelimit.c \
170	zfs_rlock.c \
171	zil.c \
172	zio.c \
173	zio_checksum.c \
174	zio_compress.c \
175	zio_crypt.c \
176	zio_inject.c \
177	zle.c \
178	zrlock.c \
179	zthr.c
180
181LUA_C = \
182	lapi.c \
183	lauxlib.c \
184	lbaselib.c \
185	lcode.c \
186	lcompat.c \
187	lcorolib.c \
188	lctype.c \
189	ldebug.c \
190	ldo.c \
191	lfunc.c \
192	lgc.c \
193	llex.c \
194	lmem.c \
195	lobject.c \
196	lopcodes.c \
197	lparser.c \
198	lstate.c \
199	lstring.c \
200	lstrlib.c \
201	ltable.c \
202	ltablib.c \
203	ltm.c \
204	lvm.c \
205	lzio.c
206
207dist_libzpool_la_SOURCES = \
208	$(USER_C)
209
210nodist_libzpool_la_SOURCES = \
211	$(KERNEL_C) \
212	$(LUA_C)
213
214libzpool_la_LIBADD = \
215	$(abs_top_builddir)/lib/libicp/libicp.la \
216	$(abs_top_builddir)/lib/libunicode/libunicode.la \
217	$(abs_top_builddir)/lib/libnvpair/libnvpair.la \
218	$(abs_top_builddir)/lib/libzstd/libzstd.la \
219	$(abs_top_builddir)/lib/libzutil/libzutil.la
220
221libzpool_la_LIBADD += $(LIBCLOCK_GETTIME) $(ZLIB_LIBS) -ldl -lm
222
223libzpool_la_LDFLAGS = -pthread
224
225if !ASAN_ENABLED
226libzpool_la_LDFLAGS += -Wl,-z,defs
227endif
228
229if BUILD_FREEBSD
230libzpool_la_LIBADD += -lgeom
231endif
232
233libzpool_la_LDFLAGS += -version-info 5:0:0
234
235if TARGET_CPU_POWERPC
236vdev_raidz_math_powerpc_altivec.$(OBJEXT): CFLAGS += -maltivec
237vdev_raidz_math_powerpc_altivec.l$(OBJEXT): CFLAGS += -maltivec
238endif
239
240include $(top_srcdir)/config/CppCheck.am
241