xref: /freebsd/lib/libarchive/Makefile (revision 9f32232447338965483f337dfcf53b04de048b4f)
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
129f322324STim KientzleVERSION= 1.2.41
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
16db38abe6STim Kientzle# The FreeBSD SHLIB_MAJOR is computed from the above values.
179f322324STim Kientzle# To bump SHLIB_MAJOR, increase the MINOR number in "version" file.
182d0d7187STim KientzleSHLIB_MAJOR!= echo $$((${ARCHIVE_API_MAJOR} + ${ARCHIVE_API_MINOR}))
199f322324STim Kientzle# The SHLIB_MAJOR computation above attempts to match the
209f322324STim Kientzle# version number generated by libtool.  (This may change
219f322324STim Kientzle# when the FreeBSD port of libtool gets fixed.)
22db38abe6STim Kientzle
23bfe891b1STim KientzleCFLAGS+=	-DPACKAGE_NAME=\"lib${LIB}\"
24bfe891b1STim KientzleCFLAGS+=	-DPACKAGE_VERSION=\"${VERSION}\"
25bfe891b1STim KientzleCFLAGS+=	-I${.OBJDIR}
26bfe891b1STim Kientzle
27db38abe6STim Kientzle# FreeBSD/arm has some limitations.
28bfe891b1STim Kientzle.if ${MACHINE_ARCH} == "arm"
29bfe891b1STim KientzleWARNS?= 3
30bfe891b1STim Kientzle.else
31bfe891b1STim KientzleWARNS?=	6
32bfe891b1STim Kientzle.endif
33bfe891b1STim Kientzle
34db38abe6STim Kientzle# Headers to be installed in /usr/include
35bfe891b1STim KientzleINCS=	archive.h archive_entry.h
36bfe891b1STim Kientzle
379f322324STim Kientzle# Build archive.h from archive.h.in by substituting version information.
389f322324STim Kientzlearchive.h:	archive.h.in Makefile
399f322324STim Kientzle	cat ${.CURDIR}/archive.h.in |					\
409f322324STim Kientzle		sed 's/@VERSION@/${VERSION}/g' | 			\
419f322324STim Kientzle		sed 's/@SHLIB_MAJOR@/${SHLIB_MAJOR}/g' |		\
429f322324STim Kientzle		sed 's/@ARCHIVE_API_MAJOR@/${ARCHIVE_API_MAJOR}/g' |	\
439f322324STim Kientzle		sed 's/@ARCHIVE_API_MINOR@/${ARCHIVE_API_MINOR}/g' |	\
449f322324STim Kientzle		cat > archive.h
459f322324STim Kientzle
469f322324STim Kientzle# archive.h needs to be cleaned
479f322324STim KientzleCLEANFILES+=	archive.h
489f322324STim Kientzle
499f322324STim Kientzle# Sources to be compiled.
509f322324STim KientzleSRCS=	archive.h					\
519f322324STim Kientzle	archive_check_magic.c				\
52bfe891b1STim Kientzle	archive_entry.c					\
53bfe891b1STim Kientzle	archive_read.c					\
54bfe891b1STim Kientzle	archive_read_data_into_buffer.c			\
55bfe891b1STim Kientzle	archive_read_data_into_fd.c			\
56bfe891b1STim Kientzle	archive_read_extract.c				\
57bfe891b1STim Kientzle	archive_read_open_fd.c				\
58bfe891b1STim Kientzle	archive_read_open_file.c			\
59bfe891b1STim Kientzle	archive_read_support_compression_all.c		\
60bfe891b1STim Kientzle	archive_read_support_compression_bzip2.c	\
61bfe891b1STim Kientzle	archive_read_support_compression_compress.c	\
62bfe891b1STim Kientzle	archive_read_support_compression_gzip.c		\
63bfe891b1STim Kientzle	archive_read_support_compression_none.c		\
64bfe891b1STim Kientzle	archive_read_support_format_all.c		\
65bfe891b1STim Kientzle	archive_read_support_format_cpio.c		\
665d9e84daSTim Kientzle	archive_read_support_format_iso9660.c		\
67bfe891b1STim Kientzle	archive_read_support_format_tar.c		\
682cac97caSTim Kientzle	archive_read_support_format_tp.c		\
695958ff08STim Kientzle	archive_read_support_format_zip.c		\
70bfe891b1STim Kientzle	archive_string.c				\
71bfe891b1STim Kientzle	archive_string_sprintf.c			\
72bfe891b1STim Kientzle	archive_util.c					\
73bfe891b1STim Kientzle	archive_write.c					\
74bfe891b1STim Kientzle	archive_write_open_fd.c				\
75bfe891b1STim Kientzle	archive_write_open_file.c			\
76bfe891b1STim Kientzle	archive_write_set_compression_bzip2.c		\
77bfe891b1STim Kientzle	archive_write_set_compression_gzip.c		\
78bfe891b1STim Kientzle	archive_write_set_compression_none.c		\
79bfe891b1STim Kientzle	archive_write_set_format.c			\
80bfe891b1STim Kientzle	archive_write_set_format_by_name.c		\
81bfe891b1STim Kientzle	archive_write_set_format_cpio.c			\
82bfe891b1STim Kientzle	archive_write_set_format_pax.c			\
83bfe891b1STim Kientzle	archive_write_set_format_shar.c			\
84bfe891b1STim Kientzle	archive_write_set_format_ustar.c
85bfe891b1STim Kientzle
86db38abe6STim Kientzle# Man pages to be installed.
87bfe891b1STim KientzleMAN=	archive_entry.3					\
88bfe891b1STim Kientzle	archive_read.3					\
89bfe891b1STim Kientzle	archive_util.3					\
90bfe891b1STim Kientzle	archive_write.3					\
91bfe891b1STim Kientzle	libarchive.3					\
92bfe891b1STim Kientzle	libarchive-formats.5				\
93bfe891b1STim Kientzle	tar.5
94bfe891b1STim Kientzle
95db38abe6STim Kientzle# Symlink the man pages under each function name.
96bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_add_entry.3
97bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_add_entry_w.3
98bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_clear.3
99bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_count.3
100bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_next.3
101bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_next_w.3
102bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_reset.3
103bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_acl_text_w.3
104bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_clear.3
105bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_clone.3
106bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_fflags_text_w.3
107bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_gname_w.3
108bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_hardlink_w.3
109bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_pathname_w.3
110bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_stat.3
111bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_symlink_w.3
112bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_copy_uname_w.3
113bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_fflags.3
114bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_fflags_text.3
115bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_free.3
116bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_gid.3
117bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_gname.3
118bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_gname_w.3
119bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_hardlink.3
120bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_ino.3
121bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_mode.3
122bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_mtime.3
123bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_mtime_nsec.3
124bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_new.3
125bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_pathname.3
126bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_pathname_w.3
127bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_rdev.3
128bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_rdevmajor.3
129bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_rdevminor.3
130bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_fflags.3
131bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_gid.3
132bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_gname.3
133bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_hardlink.3
134bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_link.3
135bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_mode.3
136bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_pathname.3
137bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_rdevmajor.3
138bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_rdevminor.3
139bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_size.3
140bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_symlink.3
141bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_uid.3
142bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_set_uname.3
143bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_size.3
144bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_stat.3
145bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_symlink.3
146bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_uid.3
147bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_uname.3
148bfe891b1STim KientzleMLINKS+=	archive_entry.3 archive_entry_uname_w.3
149bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_data.3
150bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_data_block.3
151bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_data_into_buffer.3
152bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_data_into_fd.3
153bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_data_skip.3
154bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_extract.3
155bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_extract_set_progress_callback.3
156bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_finish.3
157bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_new.3
158bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_next_header.3
159bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_open.3
160bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_open_fd.3
161bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_open_file.3
162bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_set_bytes_per_block.3
163bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_compression_all.3
164bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_compression_bzip2.3
165bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_compression_compress.3
166bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_compression_gzip.3
167bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_compression_none.3
168bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_format_all.3
169bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_format_cpio.3
17009cad9b5STim KientzleMLINKS+=	archive_read.3 archive_read_support_format_iso9660.3
171bfe891b1STim KientzleMLINKS+=	archive_read.3 archive_read_support_format_tar.3
1725958ff08STim KientzleMLINKS+=	archive_read.3 archive_read_support_format_zip.3
173bfe891b1STim KientzleMLINKS+=	archive_util.3 archive_compression.3
174bfe891b1STim KientzleMLINKS+=	archive_util.3 archive_compression_name.3
175bfe891b1STim KientzleMLINKS+=	archive_util.3 archive_errno.3
176bfe891b1STim KientzleMLINKS+=	archive_util.3 archive_error_string.3
177bfe891b1STim KientzleMLINKS+=	archive_util.3 archive_format.3
178bfe891b1STim KientzleMLINKS+=	archive_util.3 archive_format_name.3
179b772d06cSTim KientzleMLINKS+=	archive_util.3 archive_set_error.3
180bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_data.3
181bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_finish.3
182bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_header.3
183bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_new.3
184bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_open.3
185bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_open_fd.3
186bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_open_file.3
187bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_prepare.3
188bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_bytes_per_block.3
189bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_bytes_in_last_block.3
190bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_callbacks.3
191bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_compression_bzip2.3
192bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_compression_gzip.3
193bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_format_pax.3
194bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_format_shar.3
195bfe891b1STim KientzleMLINKS+=	archive_write.3 archive_write_set_format_ustar.3
196bfe891b1STim KientzleMLINKS+=	libarchive.3 archive.3
197bfe891b1STim Kientzle
198bfe891b1STim Kientzle.include <bsd.lib.mk>
199