xref: /freebsd/lib/libarchive/Makefile (revision e1089c1e0ce853bc3548d1af987ecdb5bf54353c)
12710e4d1STim Kientzle# $FreeBSD$
2bfe891b1STim Kientzle
3bfe891b1STim KientzleLIB=	archive
4e4a93f1eSRuslan ErmilovDPADD=	${LIBBZ2} ${LIBZ}
5e4a93f1eSRuslan ErmilovLDADD=	-lbz2 -lz
6db38abe6STim Kientzle
7a2b1e869STim Kientzle# FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system.
8fa07de5eSTim Kientzle# It has no real relation to the libarchive version number.
9f81da3e5STim KientzleSHLIB_MAJOR= 4
10db38abe6STim Kientzle
11da7bcba2STim KientzleCFLAGS+=	-DPLATFORM_CONFIG_H=\"config_freebsd.h\"
12bfe891b1STim KientzleCFLAGS+=	-I${.OBJDIR}
13bfe891b1STim Kientzle
14bfe891b1STim KientzleWARNS?=	6
15bfe891b1STim Kientzle
16db38abe6STim Kientzle# Headers to be installed in /usr/include
17bfe891b1STim KientzleINCS=	archive.h archive_entry.h
18bfe891b1STim Kientzle
199f322324STim Kientzle# Sources to be compiled.
20f9fe0a0aSTim KientzleSRCS=	archive_check_magic.c				\
21bfe891b1STim Kientzle	archive_entry.c					\
22b48b40f1STim Kientzle	archive_entry_copy_stat.c			\
23b48b40f1STim Kientzle	archive_entry_stat.c				\
249dd49f96STim Kientzle	archive_entry_strmode.c				\
259dd49f96STim Kientzle	archive_entry_link_resolver.c			\
26bfe891b1STim Kientzle	archive_read.c					\
27bfe891b1STim Kientzle	archive_read_data_into_fd.c			\
2843a8e5f0STim Kientzle	archive_read_disk.c				\
2943a8e5f0STim Kientzle	archive_read_disk_entry_from_file.c		\
3043a8e5f0STim Kientzle	archive_read_disk_set_standard_lookup.c		\
31bfe891b1STim Kientzle	archive_read_extract.c				\
32bfe891b1STim Kientzle	archive_read_open_fd.c				\
3397fc4d2dSTim Kientzle	archive_read_open_file.c			\
34af6513d3STim Kientzle	archive_read_open_filename.c			\
3597fc4d2dSTim Kientzle	archive_read_open_memory.c			\
36bfe891b1STim Kientzle	archive_read_support_compression_all.c		\
37bfe891b1STim Kientzle	archive_read_support_compression_bzip2.c	\
38bfe891b1STim Kientzle	archive_read_support_compression_compress.c	\
39bfe891b1STim Kientzle	archive_read_support_compression_gzip.c		\
40bfe891b1STim Kientzle	archive_read_support_compression_none.c		\
41b48b40f1STim Kientzle	archive_read_support_compression_program.c	\
42bfe891b1STim Kientzle	archive_read_support_format_all.c		\
4337320c75STim Kientzle	archive_read_support_format_ar.c		\
44bfe891b1STim Kientzle	archive_read_support_format_cpio.c		\
45a9490c59STim Kientzle	archive_read_support_format_empty.c		\
465d9e84daSTim Kientzle	archive_read_support_format_iso9660.c		\
479dd49f96STim Kientzle	archive_read_support_format_mtree.c		\
48bfe891b1STim Kientzle	archive_read_support_format_tar.c		\
495958ff08STim Kientzle	archive_read_support_format_zip.c		\
50bfe891b1STim Kientzle	archive_string.c				\
51bfe891b1STim Kientzle	archive_string_sprintf.c			\
52bfe891b1STim Kientzle	archive_util.c					\
53f81da3e5STim Kientzle	archive_virtual.c				\
54bfe891b1STim Kientzle	archive_write.c					\
55f81da3e5STim Kientzle	archive_write_disk.c				\
56f81da3e5STim Kientzle	archive_write_disk_set_standard_lookup.c	\
57bfe891b1STim Kientzle	archive_write_open_fd.c				\
5897fc4d2dSTim Kientzle	archive_write_open_file.c			\
59af6513d3STim Kientzle	archive_write_open_filename.c			\
6097fc4d2dSTim Kientzle	archive_write_open_memory.c			\
61bfe891b1STim Kientzle	archive_write_set_compression_bzip2.c		\
627c5b1173STim Kientzle	archive_write_set_compression_compress.c	\
63bfe891b1STim Kientzle	archive_write_set_compression_gzip.c		\
64bfe891b1STim Kientzle	archive_write_set_compression_none.c		\
65b48b40f1STim Kientzle	archive_write_set_compression_program.c		\
66bfe891b1STim Kientzle	archive_write_set_format.c			\
6794451fa8STim Kientzle	archive_write_set_format_ar.c			\
68bfe891b1STim Kientzle	archive_write_set_format_by_name.c		\
69bfe891b1STim Kientzle	archive_write_set_format_cpio.c			\
7017e60e62STim Kientzle	archive_write_set_format_cpio_newc.c		\
719ea64210STim Kientzle	archive_write_set_format_mtree.c		\
72bfe891b1STim Kientzle	archive_write_set_format_pax.c			\
73bfe891b1STim Kientzle	archive_write_set_format_shar.c			\
74b48b40f1STim Kientzle	archive_write_set_format_ustar.c		\
75b48b40f1STim Kientzle	filter_fork.c
76bfe891b1STim Kientzle
77db38abe6STim Kientzle# Man pages to be installed.
78bfe891b1STim KientzleMAN=	archive_entry.3					\
79bfe891b1STim Kientzle	archive_read.3					\
80e1089c1eSTim Kientzle	archive_read_disk.3				\
81bfe891b1STim Kientzle	archive_util.3					\
82bfe891b1STim Kientzle	archive_write.3					\
83f81da3e5STim Kientzle	archive_write_disk.3				\
849dd49f96STim Kientzle	cpio.5						\
85bfe891b1STim Kientzle	libarchive.3					\
86bfe891b1STim Kientzle	libarchive-formats.5				\
87bfe891b1STim Kientzle	tar.5
88bfe891b1STim Kientzle
89db38abe6STim Kientzle# Symlink the man pages under each function name.
90bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_add_entry.3
91bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_add_entry_w.3
92bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_clear.3
93bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_count.3
94bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_next.3
95bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_next_w.3
96bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_reset.3
97bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_text_w.3
98bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_clear.3
99bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_clone.3
100fa07de5eSTim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_fflags_text.3
101bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_fflags_text_w.3
10275d0856cSTim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_gname.3
103bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_gname_w.3
104bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_hardlink_w.3
1058e4bc812STim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_link.3
1068e4bc812STim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_link_w.3
107bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_pathname_w.3
108bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_stat.3
109bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_symlink_w.3
11075d0856cSTim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_uname.3
111bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_uname_w.3
112b48b40f1STim KientzleMLINKS+=	archive_entry.3 archive_entry_dev.3
113b48b40f1STim KientzleMLINKS+=	archive_entry.3 archive_entry_devmajor.3
114b48b40f1STim KientzleMLINKS+=	archive_entry.3 archive_entry_devminor.3
115b48b40f1STim KientzleMLINKS+=	archive_entry.3 archive_entry_filetype.3
116bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_fflags.3
117bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_fflags_text.3
118bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_free.3
119bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_gid.3
120bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_gname.3
121bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_gname_w.3
122bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_hardlink.3
123bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_ino.3
124bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_mode.3
125bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_mtime.3
126bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_mtime_nsec.3
127b48b40f1STim KientzleMLINKS+=	archive_entry.3 archive_entry_nlink.3
128bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_new.3
129bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_pathname.3
130bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_pathname_w.3
131bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_rdev.3
132bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_rdevmajor.3
133bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_rdevminor.3
134b48b40f1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_atime.3
135b48b40f1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_ctime.3
136b48b40f1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_dev.3
137b48b40f1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_devmajor.3
138b48b40f1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_devminor.3
139bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_fflags.3
140bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_gid.3
141bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_gname.3
142bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_hardlink.3
143bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_link.3
144bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_mode.3
145b48b40f1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_mtime.3
146b48b40f1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_nlink.3
147bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_pathname.3
148b48b40f1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_rdev.3
149bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_rdevmajor.3
150bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_rdevminor.3
151bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_size.3
152bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_symlink.3
153bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_uid.3
154bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_uname.3
155bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_size.3
156bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_stat.3
157bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_symlink.3
158bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_uid.3
159bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_uname.3
160bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_uname_w.3
161bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_data.3
162bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_data_block.3
163bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_data_into_buffer.3
164bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_data_into_fd.3
165bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_data_skip.3
166bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_extract.3
167bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_extract_set_progress_callback.3
168c12a9d81STim KientzleMLINKS+=	archive_read.3 archive_read_extract_set_skip_file.3
169bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_finish.3
170bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_new.3
171bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_next_header.3
172bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_open.3
173c12a9d81STim KientzleMLINKS+=	archive_read.3 archive_read_open2.3
17497fc4d2dSTim KientzleMLINKS+=	archive_read.3 archive_read_open_FILE.3
175bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_open_fd.3
176bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_open_file.3
177af6513d3STim KientzleMLINKS+=	archive_read.3 archive_read_open_filename.3
17897fc4d2dSTim KientzleMLINKS+=	archive_read.3 archive_read_open_memory.3
179bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_compression_all.3
180bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_compression_bzip2.3
181bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_compression_compress.3
182bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_compression_gzip.3
183bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_compression_none.3
184b48b40f1STim KientzleMLINKS+=	archive_read.3 archive_read_support_compression_program.3
185bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_format_all.3
186bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_format_cpio.3
18709cad9b5STim KientzleMLINKS+=	archive_read.3 archive_read_support_format_iso9660.3
188bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_format_tar.3
1895958ff08STim KientzleMLINKS+=	archive_read.3 archive_read_support_format_zip.3
190e1089c1eSTim KientzleMLINKS+=	archive_read_disk.3 archive_read_disk_entry_from_file.3
191e1089c1eSTim KientzleMLINKS+=	archive_read_disk.3 archive_read_disk_gname.3
192e1089c1eSTim KientzleMLINKS+=	archive_read_disk.3 archive_read_disk_new.3
193e1089c1eSTim KientzleMLINKS+=	archive_read_disk.3 archive_read_disk_set_gname_lookup.3
194e1089c1eSTim KientzleMLINKS+=	archive_read_disk.3 archive_read_disk_set_standard_lookup.3
195e1089c1eSTim KientzleMLINKS+=	archive_read_disk.3 archive_read_disk_set_symlink_hybrid.3
196e1089c1eSTim KientzleMLINKS+=	archive_read_disk.3 archive_read_disk_set_symlink_logical.3
197e1089c1eSTim KientzleMLINKS+=	archive_read_disk.3 archive_read_disk_set_symlink_physical.3
198e1089c1eSTim KientzleMLINKS+=	archive_read_disk.3 archive_read_disk_set_uname_lookup.3
199e1089c1eSTim KientzleMLINKS+=	archive_read_disk.3 archive_read_disk_uname.3
200f81da3e5STim KientzleMLINKS+=	archive_util.3 archive_clear_error.3
201bfe891b1STim KientzleMLINKS+=	archive_util.3 archive_compression.3
202bfe891b1STim KientzleMLINKS+=	archive_util.3 archive_compression_name.3
203bfe891b1STim KientzleMLINKS+=	archive_util.3 archive_errno.3
204bfe891b1STim KientzleMLINKS+=	archive_util.3 archive_error_string.3
205bfe891b1STim KientzleMLINKS+=	archive_util.3 archive_format.3
206bfe891b1STim KientzleMLINKS+=	archive_util.3 archive_format_name.3
207b772d06cSTim KientzleMLINKS+=	archive_util.3 archive_set_error.3
2087a36fb79SKai WangMLINKS+=	archive_write.3 archive_write_close.3
209bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_data.3
210bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_finish.3
211dc46be1cSTim KientzleMLINKS+=	archive_write.3 archive_write_finish_entry.3
212dc46be1cSTim KientzleMLINKS+=	archive_write.3 archive_write_get_bytes_in_last_block.3
213dc46be1cSTim KientzleMLINKS+=	archive_write.3 archive_write_get_bytes_per_block.3
214bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_header.3
215bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_new.3
216bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_open.3
21797fc4d2dSTim KientzleMLINKS+=	archive_write.3 archive_write_open_FILE.3
218bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_open_fd.3
219bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_open_file.3
220af6513d3STim KientzleMLINKS+=	archive_write.3 archive_write_open_filename.3
22197fc4d2dSTim KientzleMLINKS+=	archive_write.3 archive_write_open_memory.3
222bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_bytes_in_last_block.3
22397fc4d2dSTim KientzleMLINKS+=	archive_write.3 archive_write_set_bytes_per_block.3
224bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_callbacks.3
225bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_compression_bzip2.3
226fa07de5eSTim KientzleMLINKS+=	archive_write.3 archive_write_set_compression_compress.3
227bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_compression_gzip.3
228b48b40f1STim KientzleMLINKS+=	archive_write.3 archive_write_set_compression_none.3
229b48b40f1STim KientzleMLINKS+=	archive_write.3 archive_write_set_compression_program.3
230bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_format_pax.3
231bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_format_shar.3
232bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_format_ustar.3
233f81da3e5STim KientzleMLINKS+=	archive_write_disk.3 archive_write_disk_new.3
234f81da3e5STim KientzleMLINKS+=	archive_write_disk.3 archive_write_disk_set_group_lookup.3
235f81da3e5STim KientzleMLINKS+=	archive_write_disk.3 archive_write_disk_set_options.3
236f81da3e5STim KientzleMLINKS+=	archive_write_disk.3 archive_write_disk_set_skip_file.3
237f81da3e5STim KientzleMLINKS+=	archive_write_disk.3 archive_write_disk_set_standard_lookup.3
238f81da3e5STim KientzleMLINKS+=	archive_write_disk.3 archive_write_disk_set_user_lookup.3
239bfe891b1STim KientzleMLINKS+=	libarchive.3 archive.3
240bfe891b1STim Kientzle
241fa07de5eSTim Kientzle.PHONY: check test
242fa07de5eSTim Kientzlecheck test:
243f81da3e5STim Kientzle	cd ${.CURDIR}/test && make test
244f81da3e5STim Kientzle
245bfe891b1STim Kientzle.include <bsd.lib.mk>
246