Makefile revision 158203
1# $FreeBSD: head/lib/libarchive/Makefile 158203 2006-05-01 01:02:19Z kientzle $
2
3LIB=	archive
4DPADD=	${LIBBZ2} ${LIBZ}
5LDADD=	-lbz2 -lz
6
7# The libarchive version stamp.
8# Version is three numbers:
9#  Major: Bumped ONLY when API/ABI breakage happens.
10#  Minor: Bumped when significant new features are added (see SHLIB_MAJOR)
11#  Revision: Bumped on any notable change
12VERSION= 1.2.53
13ARCHIVE_API_MAJOR!=	echo ${VERSION} | sed -e 's/\..*//'
14ARCHIVE_API_MINOR!=	echo ${VERSION} | sed -e 's/[0-9]*\.//' | sed -e 's/\..*//'
15
16# The FreeBSD SHLIB_MAJOR is computed from the above values.
17# To bump SHLIB_MAJOR, increase the MINOR number in "version" file.
18SHLIB_MAJOR!= echo $$((${ARCHIVE_API_MAJOR} + ${ARCHIVE_API_MINOR}))
19# The SHLIB_MAJOR computation above attempts to match the
20# version number generated by libtool.  (This may change
21# when the FreeBSD port of libtool gets fixed.)
22
23CFLAGS+=	-DPACKAGE_NAME=\"lib${LIB}\"
24CFLAGS+=	-DPACKAGE_VERSION=\"${VERSION}\"
25CFLAGS+=	-I${.OBJDIR}
26
27# FreeBSD/arm has some limitations.
28.if ${MACHINE_ARCH} == "arm"
29WARNS?= 3
30.else
31WARNS?=	6
32.endif
33
34# Headers to be installed in /usr/include
35INCS=	archive.h archive_entry.h
36
37# Build archive.h from archive.h.in by substituting version information.
38archive.h:	archive.h.in Makefile
39	cat ${.CURDIR}/archive.h.in |					\
40		sed 's/@VERSION@/${VERSION}/g' | 			\
41		sed 's/@SHLIB_MAJOR@/${SHLIB_MAJOR}/g' |		\
42		sed 's/@ARCHIVE_API_MAJOR@/${ARCHIVE_API_MAJOR}/g' |	\
43		sed 's/@ARCHIVE_API_MINOR@/${ARCHIVE_API_MINOR}/g' |	\
44		cat > archive.h
45
46# archive.h needs to be cleaned
47CLEANFILES+=	archive.h
48
49# Sources to be compiled.
50SRCS=	archive.h					\
51	archive_check_magic.c				\
52	archive_entry.c					\
53	archive_read.c					\
54	archive_read_data_into_buffer.c			\
55	archive_read_data_into_fd.c			\
56	archive_read_extract.c				\
57	archive_read_open_fd.c				\
58	archive_read_open_file.c			\
59	archive_read_support_compression_all.c		\
60	archive_read_support_compression_bzip2.c	\
61	archive_read_support_compression_compress.c	\
62	archive_read_support_compression_gzip.c		\
63	archive_read_support_compression_none.c		\
64	archive_read_support_format_all.c		\
65	archive_read_support_format_cpio.c		\
66	archive_read_support_format_iso9660.c		\
67	archive_read_support_format_tar.c		\
68	archive_read_support_format_zip.c		\
69	archive_string.c				\
70	archive_string_sprintf.c			\
71	archive_util.c					\
72	archive_write.c					\
73	archive_write_open_fd.c				\
74	archive_write_open_file.c			\
75	archive_write_set_compression_bzip2.c		\
76	archive_write_set_compression_gzip.c		\
77	archive_write_set_compression_none.c		\
78	archive_write_set_format.c			\
79	archive_write_set_format_by_name.c		\
80	archive_write_set_format_cpio.c			\
81	archive_write_set_format_pax.c			\
82	archive_write_set_format_shar.c			\
83	archive_write_set_format_ustar.c
84
85# Man pages to be installed.
86MAN=	archive_entry.3					\
87	archive_read.3					\
88	archive_util.3					\
89	archive_write.3					\
90	libarchive.3					\
91	libarchive-formats.5				\
92	tar.5
93
94# Symlink the man pages under each function name.
95MLINKS+=	archive_entry.3 archive_entry_acl_add_entry.3
96MLINKS+=	archive_entry.3 archive_entry_acl_add_entry_w.3
97MLINKS+=	archive_entry.3 archive_entry_acl_clear.3
98MLINKS+=	archive_entry.3 archive_entry_acl_count.3
99MLINKS+=	archive_entry.3 archive_entry_acl_next.3
100MLINKS+=	archive_entry.3 archive_entry_acl_next_w.3
101MLINKS+=	archive_entry.3 archive_entry_acl_reset.3
102MLINKS+=	archive_entry.3 archive_entry_acl_text_w.3
103MLINKS+=	archive_entry.3 archive_entry_clear.3
104MLINKS+=	archive_entry.3 archive_entry_clone.3
105MLINKS+=	archive_entry.3 archive_entry_copy_fflags_text_w.3
106MLINKS+=	archive_entry.3 archive_entry_copy_gname_w.3
107MLINKS+=	archive_entry.3 archive_entry_copy_hardlink_w.3
108MLINKS+=	archive_entry.3 archive_entry_copy_pathname_w.3
109MLINKS+=	archive_entry.3 archive_entry_copy_stat.3
110MLINKS+=	archive_entry.3 archive_entry_copy_symlink_w.3
111MLINKS+=	archive_entry.3 archive_entry_copy_uname_w.3
112MLINKS+=	archive_entry.3 archive_entry_fflags.3
113MLINKS+=	archive_entry.3 archive_entry_fflags_text.3
114MLINKS+=	archive_entry.3 archive_entry_free.3
115MLINKS+=	archive_entry.3 archive_entry_gid.3
116MLINKS+=	archive_entry.3 archive_entry_gname.3
117MLINKS+=	archive_entry.3 archive_entry_gname_w.3
118MLINKS+=	archive_entry.3 archive_entry_hardlink.3
119MLINKS+=	archive_entry.3 archive_entry_ino.3
120MLINKS+=	archive_entry.3 archive_entry_mode.3
121MLINKS+=	archive_entry.3 archive_entry_mtime.3
122MLINKS+=	archive_entry.3 archive_entry_mtime_nsec.3
123MLINKS+=	archive_entry.3 archive_entry_new.3
124MLINKS+=	archive_entry.3 archive_entry_pathname.3
125MLINKS+=	archive_entry.3 archive_entry_pathname_w.3
126MLINKS+=	archive_entry.3 archive_entry_rdev.3
127MLINKS+=	archive_entry.3 archive_entry_rdevmajor.3
128MLINKS+=	archive_entry.3 archive_entry_rdevminor.3
129MLINKS+=	archive_entry.3 archive_entry_set_fflags.3
130MLINKS+=	archive_entry.3 archive_entry_set_gid.3
131MLINKS+=	archive_entry.3 archive_entry_set_gname.3
132MLINKS+=	archive_entry.3 archive_entry_set_hardlink.3
133MLINKS+=	archive_entry.3 archive_entry_set_link.3
134MLINKS+=	archive_entry.3 archive_entry_set_mode.3
135MLINKS+=	archive_entry.3 archive_entry_set_pathname.3
136MLINKS+=	archive_entry.3 archive_entry_set_rdevmajor.3
137MLINKS+=	archive_entry.3 archive_entry_set_rdevminor.3
138MLINKS+=	archive_entry.3 archive_entry_set_size.3
139MLINKS+=	archive_entry.3 archive_entry_set_symlink.3
140MLINKS+=	archive_entry.3 archive_entry_set_uid.3
141MLINKS+=	archive_entry.3 archive_entry_set_uname.3
142MLINKS+=	archive_entry.3 archive_entry_size.3
143MLINKS+=	archive_entry.3 archive_entry_stat.3
144MLINKS+=	archive_entry.3 archive_entry_symlink.3
145MLINKS+=	archive_entry.3 archive_entry_uid.3
146MLINKS+=	archive_entry.3 archive_entry_uname.3
147MLINKS+=	archive_entry.3 archive_entry_uname_w.3
148MLINKS+=	archive_read.3 archive_read_data.3
149MLINKS+=	archive_read.3 archive_read_data_block.3
150MLINKS+=	archive_read.3 archive_read_data_into_buffer.3
151MLINKS+=	archive_read.3 archive_read_data_into_fd.3
152MLINKS+=	archive_read.3 archive_read_data_skip.3
153MLINKS+=	archive_read.3 archive_read_extract.3
154MLINKS+=	archive_read.3 archive_read_extract_set_progress_callback.3
155MLINKS+=	archive_read.3 archive_read_finish.3
156MLINKS+=	archive_read.3 archive_read_new.3
157MLINKS+=	archive_read.3 archive_read_next_header.3
158MLINKS+=	archive_read.3 archive_read_open.3
159MLINKS+=	archive_read.3 archive_read_open_fd.3
160MLINKS+=	archive_read.3 archive_read_open_file.3
161MLINKS+=	archive_read.3 archive_read_set_bytes_per_block.3
162MLINKS+=	archive_read.3 archive_read_support_compression_all.3
163MLINKS+=	archive_read.3 archive_read_support_compression_bzip2.3
164MLINKS+=	archive_read.3 archive_read_support_compression_compress.3
165MLINKS+=	archive_read.3 archive_read_support_compression_gzip.3
166MLINKS+=	archive_read.3 archive_read_support_compression_none.3
167MLINKS+=	archive_read.3 archive_read_support_format_all.3
168MLINKS+=	archive_read.3 archive_read_support_format_cpio.3
169MLINKS+=	archive_read.3 archive_read_support_format_iso9660.3
170MLINKS+=	archive_read.3 archive_read_support_format_tar.3
171MLINKS+=	archive_read.3 archive_read_support_format_zip.3
172MLINKS+=	archive_util.3 archive_compression.3
173MLINKS+=	archive_util.3 archive_compression_name.3
174MLINKS+=	archive_util.3 archive_errno.3
175MLINKS+=	archive_util.3 archive_error_string.3
176MLINKS+=	archive_util.3 archive_format.3
177MLINKS+=	archive_util.3 archive_format_name.3
178MLINKS+=	archive_util.3 archive_set_error.3
179MLINKS+=	archive_write.3 archive_write_data.3
180MLINKS+=	archive_write.3 archive_write_finish.3
181MLINKS+=	archive_write.3 archive_write_header.3
182MLINKS+=	archive_write.3 archive_write_new.3
183MLINKS+=	archive_write.3 archive_write_open.3
184MLINKS+=	archive_write.3 archive_write_open_fd.3
185MLINKS+=	archive_write.3 archive_write_open_file.3
186MLINKS+=	archive_write.3 archive_write_prepare.3
187MLINKS+=	archive_write.3 archive_write_set_bytes_per_block.3
188MLINKS+=	archive_write.3 archive_write_set_bytes_in_last_block.3
189MLINKS+=	archive_write.3 archive_write_set_callbacks.3
190MLINKS+=	archive_write.3 archive_write_set_compression_bzip2.3
191MLINKS+=	archive_write.3 archive_write_set_compression_gzip.3
192MLINKS+=	archive_write.3 archive_write_set_format_pax.3
193MLINKS+=	archive_write.3 archive_write_set_format_shar.3
194MLINKS+=	archive_write.3 archive_write_set_format_ustar.3
195MLINKS+=	libarchive.3 archive.3
196
197.include <bsd.lib.mk>
198