xref: /freebsd/lib/libarchive/Makefile (revision af6513d3ea90da68883b109040d20b6ff6a9ea29)
12710e4d1STim Kientzle# $FreeBSD$
2bfe891b1STim Kientzle
3bfe891b1STim KientzleLIB=	archive
4e4a93f1eSRuslan ErmilovDPADD=	${LIBBZ2} ${LIBZ}
5e4a93f1eSRuslan ErmilovLDADD=	-lbz2 -lz
6db38abe6STim Kientzle
79f322324STim Kientzle# The libarchive version stamp.
89f322324STim Kientzle# Version is three numbers:
99f322324STim Kientzle#  Major: Bumped ONLY when API/ABI breakage happens.
109f322324STim Kientzle#  Minor: Bumped when significant new features are added (see SHLIB_MAJOR)
119f322324STim Kientzle#  Revision: Bumped on any notable change
12d3b6573bSTim KientzleVERSION= 1.2.53
139f322324STim KientzleARCHIVE_API_MAJOR!=	echo ${VERSION} | sed -e 's/\..*//'
149f322324STim KientzleARCHIVE_API_MINOR!=	echo ${VERSION} | sed -e 's/[0-9]*\.//' | sed -e 's/\..*//'
15db38abe6STim Kientzle
16a2b1e869STim Kientzle# FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system.
17a2b1e869STim Kientzle# It has no real relation to the version number above.
18a2b1e869STim KientzleSHLIB_MAJOR= 3
19db38abe6STim Kientzle
20bfe891b1STim KientzleCFLAGS+=	-DPACKAGE_NAME=\"lib${LIB}\"
21bfe891b1STim KientzleCFLAGS+=	-DPACKAGE_VERSION=\"${VERSION}\"
22bfe891b1STim KientzleCFLAGS+=	-I${.OBJDIR}
23bfe891b1STim Kientzle
24db38abe6STim Kientzle# FreeBSD/arm has some limitations.
25bfe891b1STim Kientzle.if ${MACHINE_ARCH} == "arm"
26bfe891b1STim KientzleWARNS?= 3
27bfe891b1STim Kientzle.else
28bfe891b1STim KientzleWARNS?=	6
29bfe891b1STim Kientzle.endif
30bfe891b1STim Kientzle
31db38abe6STim Kientzle# Headers to be installed in /usr/include
32bfe891b1STim KientzleINCS=	archive.h archive_entry.h
33bfe891b1STim Kientzle
349f322324STim Kientzle# Build archive.h from archive.h.in by substituting version information.
35c12a9d81STim Kientzle# Note: FreeBSD has inttypes.h, so enable that include in archive.h.in
369f322324STim Kientzlearchive.h:	archive.h.in Makefile
379f322324STim Kientzle	cat ${.CURDIR}/archive.h.in |					\
389f322324STim Kientzle		sed 's/@VERSION@/${VERSION}/g' | 			\
399f322324STim Kientzle		sed 's/@SHLIB_MAJOR@/${SHLIB_MAJOR}/g' |		\
409f322324STim Kientzle		sed 's/@ARCHIVE_API_MAJOR@/${ARCHIVE_API_MAJOR}/g' |	\
419f322324STim Kientzle		sed 's/@ARCHIVE_API_MINOR@/${ARCHIVE_API_MINOR}/g' |	\
42c12a9d81STim Kientzle		sed 's|@ARCHIVE_H_INCLUDE_INTTYPES_H@|#include <inttypes.h>  /* For int64_t */|g' |			\
439f322324STim Kientzle		cat > archive.h
449f322324STim Kientzle
459f322324STim Kientzle# archive.h needs to be cleaned
469f322324STim KientzleCLEANFILES+=	archive.h
479f322324STim Kientzle
489f322324STim Kientzle# Sources to be compiled.
499f322324STim KientzleSRCS=	archive.h					\
509f322324STim Kientzle	archive_check_magic.c				\
51bfe891b1STim Kientzle	archive_entry.c					\
52bfe891b1STim Kientzle	archive_read.c					\
53bfe891b1STim Kientzle	archive_read_data_into_buffer.c			\
54bfe891b1STim Kientzle	archive_read_data_into_fd.c			\
55bfe891b1STim Kientzle	archive_read_extract.c				\
56bfe891b1STim Kientzle	archive_read_open_fd.c				\
57af6513d3STim Kientzle	archive_read_open_filename.c			\
58bfe891b1STim Kientzle	archive_read_support_compression_all.c		\
59bfe891b1STim Kientzle	archive_read_support_compression_bzip2.c	\
60bfe891b1STim Kientzle	archive_read_support_compression_compress.c	\
61bfe891b1STim Kientzle	archive_read_support_compression_gzip.c		\
62bfe891b1STim Kientzle	archive_read_support_compression_none.c		\
63bfe891b1STim Kientzle	archive_read_support_format_all.c		\
64bfe891b1STim Kientzle	archive_read_support_format_cpio.c		\
655d9e84daSTim Kientzle	archive_read_support_format_iso9660.c		\
66bfe891b1STim Kientzle	archive_read_support_format_tar.c		\
675958ff08STim Kientzle	archive_read_support_format_zip.c		\
68bfe891b1STim Kientzle	archive_string.c				\
69bfe891b1STim Kientzle	archive_string_sprintf.c			\
70bfe891b1STim Kientzle	archive_util.c					\
71bfe891b1STim Kientzle	archive_write.c					\
72bfe891b1STim Kientzle	archive_write_open_fd.c				\
73af6513d3STim Kientzle	archive_write_open_filename.c			\
74bfe891b1STim Kientzle	archive_write_set_compression_bzip2.c		\
75bfe891b1STim Kientzle	archive_write_set_compression_gzip.c		\
76bfe891b1STim Kientzle	archive_write_set_compression_none.c		\
77bfe891b1STim Kientzle	archive_write_set_format.c			\
78bfe891b1STim Kientzle	archive_write_set_format_by_name.c		\
79bfe891b1STim Kientzle	archive_write_set_format_cpio.c			\
80bfe891b1STim Kientzle	archive_write_set_format_pax.c			\
81bfe891b1STim Kientzle	archive_write_set_format_shar.c			\
82bfe891b1STim Kientzle	archive_write_set_format_ustar.c
83bfe891b1STim Kientzle
84db38abe6STim Kientzle# Man pages to be installed.
85bfe891b1STim KientzleMAN=	archive_entry.3					\
86bfe891b1STim Kientzle	archive_read.3					\
87bfe891b1STim Kientzle	archive_util.3					\
88bfe891b1STim Kientzle	archive_write.3					\
89bfe891b1STim Kientzle	libarchive.3					\
90bfe891b1STim Kientzle	libarchive-formats.5				\
91bfe891b1STim Kientzle	tar.5
92bfe891b1STim Kientzle
93db38abe6STim Kientzle# Symlink the man pages under each function name.
94bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_add_entry.3
95bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_add_entry_w.3
96bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_clear.3
97bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_count.3
98bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_next.3
99bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_next_w.3
100bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_reset.3
101bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_text_w.3
102bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_clear.3
103bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_clone.3
104bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_fflags_text_w.3
105bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_gname_w.3
106bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_hardlink_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
110bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_uname_w.3
111bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_fflags.3
112bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_fflags_text.3
113bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_free.3
114bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_gid.3
115bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_gname.3
116bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_gname_w.3
117bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_hardlink.3
118bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_ino.3
119bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_mode.3
120bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_mtime.3
121bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_mtime_nsec.3
122bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_new.3
123bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_pathname.3
124bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_pathname_w.3
125bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_rdev.3
126bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_rdevmajor.3
127bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_rdevminor.3
128bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_fflags.3
129bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_gid.3
130bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_gname.3
131bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_hardlink.3
132bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_link.3
133bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_mode.3
134bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_pathname.3
135bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_rdevmajor.3
136bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_rdevminor.3
137bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_size.3
138bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_symlink.3
139bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_uid.3
140bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_uname.3
141bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_size.3
142bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_stat.3
143bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_symlink.3
144bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_uid.3
145bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_uname.3
146bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_uname_w.3
147bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_data.3
148bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_data_block.3
149bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_data_into_buffer.3
150bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_data_into_fd.3
151bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_data_skip.3
152bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_extract.3
153bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_extract_set_progress_callback.3
154c12a9d81STim KientzleMLINKS+=	archive_read.3 archive_read_extract_set_skip_file.3
155bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_finish.3
156bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_new.3
157bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_next_header.3
158bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_open.3
159c12a9d81STim KientzleMLINKS+=	archive_read.3 archive_read_open2.3
160bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_open_fd.3
161bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_open_file.3
162af6513d3STim KientzleMLINKS+=	archive_read.3 archive_read_open_filename.3
163bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_set_bytes_per_block.3
164bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_compression_all.3
165bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_compression_bzip2.3
166bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_compression_compress.3
167bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_compression_gzip.3
168bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_compression_none.3
169bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_format_all.3
170bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_format_cpio.3
17109cad9b5STim KientzleMLINKS+=	archive_read.3 archive_read_support_format_iso9660.3
172bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_format_tar.3
1735958ff08STim KientzleMLINKS+=	archive_read.3 archive_read_support_format_zip.3
174bfe891b1STim KientzleMLINKS+=	archive_util.3 archive_compression.3
175bfe891b1STim KientzleMLINKS+=	archive_util.3 archive_compression_name.3
176bfe891b1STim KientzleMLINKS+=	archive_util.3 archive_errno.3
177bfe891b1STim KientzleMLINKS+=	archive_util.3 archive_error_string.3
178bfe891b1STim KientzleMLINKS+=	archive_util.3 archive_format.3
179bfe891b1STim KientzleMLINKS+=	archive_util.3 archive_format_name.3
180b772d06cSTim KientzleMLINKS+=	archive_util.3 archive_set_error.3
181bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_data.3
182bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_finish.3
183bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_header.3
184bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_new.3
185bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_open.3
186bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_open_fd.3
187bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_open_file.3
188af6513d3STim KientzleMLINKS+=	archive_write.3 archive_write_open_filename.3
189bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_bytes_per_block.3
190bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_bytes_in_last_block.3
191bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_callbacks.3
192bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_compression_bzip2.3
193bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_compression_gzip.3
194bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_format_pax.3
195bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_format_shar.3
196bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_format_ustar.3
197bfe891b1STim KientzleMLINKS+=	libarchive.3 archive.3
198bfe891b1STim Kientzle
199bfe891b1STim Kientzle.include <bsd.lib.mk>
200