xref: /freebsd/sys/contrib/openzfs/lib/libzpool/Makefile.am (revision cfd6422a5217410fbd66f7a7a8a64d9d85e61229)
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_sa.c \
167	zfs_znode.c \
168	zfs_ratelimit.c \
169	zfs_rlock.c \
170	zil.c \
171	zio.c \
172	zio_checksum.c \
173	zio_compress.c \
174	zio_crypt.c \
175	zio_inject.c \
176	zle.c \
177	zrlock.c \
178	zthr.c
179
180LUA_C = \
181	lapi.c \
182	lauxlib.c \
183	lbaselib.c \
184	lcode.c \
185	lcompat.c \
186	lcorolib.c \
187	lctype.c \
188	ldebug.c \
189	ldo.c \
190	lfunc.c \
191	lgc.c \
192	llex.c \
193	lmem.c \
194	lobject.c \
195	lopcodes.c \
196	lparser.c \
197	lstate.c \
198	lstring.c \
199	lstrlib.c \
200	ltable.c \
201	ltablib.c \
202	ltm.c \
203	lvm.c \
204	lzio.c
205
206dist_libzpool_la_SOURCES = \
207	$(USER_C)
208
209nodist_libzpool_la_SOURCES = \
210	$(KERNEL_C) \
211	$(LUA_C)
212
213libzpool_la_LIBADD = \
214	$(abs_top_builddir)/lib/libicp/libicp.la \
215	$(abs_top_builddir)/lib/libunicode/libunicode.la \
216	$(abs_top_builddir)/lib/libzfs_core/libzfs_core.la \
217	$(abs_top_builddir)/lib/libnvpair/libnvpair.la \
218	$(abs_top_builddir)/lib/libzstd/libzstd.la
219
220libzpool_la_LIBADD += $(LIBCLOCK_GETTIME) $(ZLIB_LIBS) -ldl -lm
221
222libzpool_la_LDFLAGS = -pthread
223
224if !ASAN_ENABLED
225libzpool_la_LDFLAGS += -Wl,-z,defs
226endif
227
228if BUILD_FREEBSD
229libzpool_la_LIBADD += -lgeom
230endif
231
232libzpool_la_LDFLAGS += -version-info 4:0:0
233
234if TARGET_CPU_POWERPC
235vdev_raidz_math_powerpc_altivec.$(OBJEXT): CFLAGS += -maltivec
236vdev_raidz_math_powerpc_altivec.l$(OBJEXT): CFLAGS += -maltivec
237endif
238