Add our READMEs.
[dragonfly.git] / lib / libarchive / Makefile
CommitLineData
db6b0fac 1# $FreeBSD: src/lib/libarchive/Makefile,v 1.50 2006/09/05 05:59:45 kientzle Exp $
d4b15785 2# $DragonFly: src/lib/libarchive/Makefile,v 1.8 2007/04/11 22:49:21 corecode Exp $
c4708c74
JS
3
4LIB= archive
5
6PATCHES!= echo ${.CURDIR}/patches/*.patch
aa126772 7CONTRIBDIR= ${.CURDIR}/../../contrib/libarchive-2.0/libarchive
c4708c74
JS
8.PATH: ${CONTRIBDIR}
9
aa126772
PA
10VERSION!= cat ${CONTRIBDIR}/../version
11ARCHIVE_API_MAJOR!= echo ${VERSION} | sed -e 's/[^0-9]/./g' -e 's/\..*//'
12ARCHIVE_API_MINOR!= echo ${VERSION} | sed -e 's/[^0-9]/./g' -e 's/[0-9]*\.//' -e 's/\..*//'
13SHLIB_MAJOR= 5
c4708c74 14CFLAGS+= -DHAVE_CONFIG_H
db6b0fac 15CFLAGS+= -I${.OBJDIR} -I${.CURDIR} -I${CONTRIBDIR} -I-
c4708c74
JS
16WARNS?= 6
17
18INCS= archive.h archive_entry.h
19
20# Note: archive.h does need to be listed here, since it's built
21SRCS= archive.h \
22 archive_check_magic.c \
23 archive_entry.c \
24 archive_read.c \
c4708c74
JS
25 archive_read_data_into_fd.c \
26 archive_read_extract.c \
27 archive_read_open_fd.c \
28 archive_read_open_file.c \
db6b0fac
PA
29 archive_read_open_filename.c \
30 archive_read_open_memory.c \
c4708c74
JS
31 archive_read_support_compression_all.c \
32 archive_read_support_compression_bzip2.c \
33 archive_read_support_compression_compress.c \
34 archive_read_support_compression_gzip.c \
35 archive_read_support_compression_none.c \
36 archive_read_support_format_all.c \
37 archive_read_support_format_cpio.c \
aa126772 38 archive_read_support_format_empty.c \
720c3558 39 archive_read_support_format_iso9660.c \
c4708c74 40 archive_read_support_format_tar.c \
720c3558 41 archive_read_support_format_zip.c \
c4708c74
JS
42 archive_string.c \
43 archive_string_sprintf.c \
44 archive_util.c \
aa126772 45 archive_virtual.c \
c4708c74 46 archive_write.c \
aa126772
PA
47 archive_write_disk.c \
48 archive_write_disk_set_standard_lookup.c \
c4708c74
JS
49 archive_write_open_fd.c \
50 archive_write_open_file.c \
db6b0fac
PA
51 archive_write_open_filename.c \
52 archive_write_open_memory.c \
c4708c74
JS
53 archive_write_set_compression_bzip2.c \
54 archive_write_set_compression_gzip.c \
55 archive_write_set_compression_none.c \
56 archive_write_set_format.c \
57 archive_write_set_format_by_name.c \
58 archive_write_set_format_cpio.c \
59 archive_write_set_format_pax.c \
60 archive_write_set_format_shar.c \
61 archive_write_set_format_ustar.c
62
63SRCS+= ${PATCHES}
64
65MAN= archive_entry.3 \
66 archive_read.3 \
67 archive_util.3 \
68 archive_write.3 \
95993d95 69 archive_write_disk.3 \
c4708c74
JS
70 libarchive.3 \
71 libarchive-formats.5 \
72 tar.5
73
74MLINKS+= archive_entry.3 archive_entry_acl_add_entry.3
75MLINKS+= archive_entry.3 archive_entry_acl_add_entry_w.3
76MLINKS+= archive_entry.3 archive_entry_acl_clear.3
77MLINKS+= archive_entry.3 archive_entry_acl_count.3
78MLINKS+= archive_entry.3 archive_entry_acl_next.3
79MLINKS+= archive_entry.3 archive_entry_acl_next_w.3
80MLINKS+= archive_entry.3 archive_entry_acl_reset.3
81MLINKS+= archive_entry.3 archive_entry_acl_text_w.3
b6989f5b
SW
82MLINKS+= archive_entry.3 archive_entry_atime.3
83MLINKS+= archive_entry.3 archive_entry_atime_nsec.3
c4708c74
JS
84MLINKS+= archive_entry.3 archive_entry_clear.3
85MLINKS+= archive_entry.3 archive_entry_clone.3
86MLINKS+= archive_entry.3 archive_entry_copy_fflags_text_w.3
87MLINKS+= archive_entry.3 archive_entry_copy_gname_w.3
b6989f5b 88MLINKS+= archive_entry.3 archive_entry_copy_hardlink.3
c4708c74
JS
89MLINKS+= archive_entry.3 archive_entry_copy_hardlink_w.3
90MLINKS+= archive_entry.3 archive_entry_copy_pathname_w.3
91MLINKS+= archive_entry.3 archive_entry_copy_stat.3
aa126772 92MLINKS+= archive_entry.3 archive_entry_copy_symlink.3
c4708c74
JS
93MLINKS+= archive_entry.3 archive_entry_copy_symlink_w.3
94MLINKS+= archive_entry.3 archive_entry_copy_uname_w.3
b6989f5b 95MLINKS+= archive_entry.3 archive_entry_dev.3
c4708c74
JS
96MLINKS+= archive_entry.3 archive_entry_fflags.3
97MLINKS+= archive_entry.3 archive_entry_fflags_text.3
98MLINKS+= archive_entry.3 archive_entry_free.3
99MLINKS+= archive_entry.3 archive_entry_gid.3
100MLINKS+= archive_entry.3 archive_entry_gname.3
c4708c74
JS
101MLINKS+= archive_entry.3 archive_entry_hardlink.3
102MLINKS+= archive_entry.3 archive_entry_ino.3
103MLINKS+= archive_entry.3 archive_entry_mode.3
104MLINKS+= archive_entry.3 archive_entry_mtime.3
105MLINKS+= archive_entry.3 archive_entry_mtime_nsec.3
106MLINKS+= archive_entry.3 archive_entry_new.3
107MLINKS+= archive_entry.3 archive_entry_pathname.3
108MLINKS+= archive_entry.3 archive_entry_pathname_w.3
109MLINKS+= archive_entry.3 archive_entry_rdev.3
110MLINKS+= archive_entry.3 archive_entry_rdevmajor.3
111MLINKS+= archive_entry.3 archive_entry_rdevminor.3
112MLINKS+= archive_entry.3 archive_entry_set_fflags.3
113MLINKS+= archive_entry.3 archive_entry_set_gid.3
114MLINKS+= archive_entry.3 archive_entry_set_gname.3
115MLINKS+= archive_entry.3 archive_entry_set_hardlink.3
116MLINKS+= archive_entry.3 archive_entry_set_link.3
117MLINKS+= archive_entry.3 archive_entry_set_mode.3
b6989f5b 118MLINKS+= archive_entry.3 archive_entry_set_mtime.3
c4708c74
JS
119MLINKS+= archive_entry.3 archive_entry_set_pathname.3
120MLINKS+= archive_entry.3 archive_entry_set_rdevmajor.3
121MLINKS+= archive_entry.3 archive_entry_set_rdevminor.3
122MLINKS+= archive_entry.3 archive_entry_set_size.3
123MLINKS+= archive_entry.3 archive_entry_set_symlink.3
124MLINKS+= archive_entry.3 archive_entry_set_uid.3
125MLINKS+= archive_entry.3 archive_entry_set_uname.3
126MLINKS+= archive_entry.3 archive_entry_size.3
127MLINKS+= archive_entry.3 archive_entry_stat.3
128MLINKS+= archive_entry.3 archive_entry_symlink.3
129MLINKS+= archive_entry.3 archive_entry_uid.3
130MLINKS+= archive_entry.3 archive_entry_uname.3
b6989f5b 131MLINKS+= archive_read.3 archive_read_close.3
c4708c74
JS
132MLINKS+= archive_read.3 archive_read_data.3
133MLINKS+= archive_read.3 archive_read_data_block.3
134MLINKS+= archive_read.3 archive_read_data_into_buffer.3
135MLINKS+= archive_read.3 archive_read_data_into_fd.3
136MLINKS+= archive_read.3 archive_read_data_skip.3
137MLINKS+= archive_read.3 archive_read_extract.3
138MLINKS+= archive_read.3 archive_read_extract_set_progress_callback.3
139MLINKS+= archive_read.3 archive_read_finish.3
140MLINKS+= archive_read.3 archive_read_new.3
141MLINKS+= archive_read.3 archive_read_next_header.3
142MLINKS+= archive_read.3 archive_read_open.3
db6b0fac
PA
143MLINKS+= archive_read.3 archive_read_open2.3
144MLINKS+= archive_read.3 archive_read_open_FILE.3
c4708c74 145MLINKS+= archive_read.3 archive_read_open_fd.3
db6b0fac
PA
146MLINKS+= archive_read.3 archive_read_open_filename.3
147MLINKS+= archive_read.3 archive_read_open_memory.3
c4708c74
JS
148MLINKS+= archive_read.3 archive_read_support_compression_all.3
149MLINKS+= archive_read.3 archive_read_support_compression_bzip2.3
150MLINKS+= archive_read.3 archive_read_support_compression_compress.3
151MLINKS+= archive_read.3 archive_read_support_compression_gzip.3
152MLINKS+= archive_read.3 archive_read_support_compression_none.3
153MLINKS+= archive_read.3 archive_read_support_format_all.3
154MLINKS+= archive_read.3 archive_read_support_format_cpio.3
aa126772 155MLINKS+= archive_read.3 archive_read_support_format_empty.3
b6989f5b 156MLINKS+= archive_read.3 archive_read_support_format_iso9660.3
c4708c74 157MLINKS+= archive_read.3 archive_read_support_format_tar.3
b6989f5b 158MLINKS+= archive_read.3 archive_read_support_format_zip.3
aa126772 159MLINKS+= archive_util.3 archive_clear_error.3
c4708c74
JS
160MLINKS+= archive_util.3 archive_compression.3
161MLINKS+= archive_util.3 archive_compression_name.3
162MLINKS+= archive_util.3 archive_errno.3
163MLINKS+= archive_util.3 archive_error_string.3
164MLINKS+= archive_util.3 archive_format.3
165MLINKS+= archive_util.3 archive_format_name.3
166MLINKS+= archive_util.3 archive_set_error.3
b6989f5b 167MLINKS+= archive_write.3 archive_write_close.3
c4708c74
JS
168MLINKS+= archive_write.3 archive_write_data.3
169MLINKS+= archive_write.3 archive_write_finish.3
aa126772
PA
170MLINKS+= archive_write.3 archive_write_finish_entry.3
171MLINKS+= archive_write.3 archive_write_get_bytes_per_block.3
c4708c74
JS
172MLINKS+= archive_write.3 archive_write_header.3
173MLINKS+= archive_write.3 archive_write_new.3
174MLINKS+= archive_write.3 archive_write_open.3
db6b0fac 175MLINKS+= archive_write.3 archive_write_open_FILE.3
c4708c74 176MLINKS+= archive_write.3 archive_write_open_fd.3
aa126772
PA
177MLINKS+= archive_write.3 archive_write_open_filename.3
178MLINKS+= archive_write.3 archive_write_open_memory.3
c4708c74 179MLINKS+= archive_write.3 archive_write_set_bytes_in_last_block.3
aa126772 180MLINKS+= archive_write.3 archive_write_set_bytes_per_block.3
c4708c74
JS
181MLINKS+= archive_write.3 archive_write_set_compression_bzip2.3
182MLINKS+= archive_write.3 archive_write_set_compression_gzip.3
b6989f5b 183MLINKS+= archive_write.3 archive_write_set_format_cpio.3
c4708c74 184MLINKS+= archive_write.3 archive_write_set_format_pax.3
b6989f5b 185MLINKS+= archive_write.3 archive_write_set_format_pax_restricted.3
c4708c74 186MLINKS+= archive_write.3 archive_write_set_format_shar.3
b6989f5b 187MLINKS+= archive_write.3 archive_write_set_format_shar_binary.3
c4708c74 188MLINKS+= archive_write.3 archive_write_set_format_ustar.3
95993d95
PA
189MLINKS+= archive_write_disk.3 archive_write_disk_close.3
190MLINKS+= archive_write_disk.3 archive_write_disk_data.3
191MLINKS+= archive_write_disk.3 archive_write_disk_finish.3
192MLINKS+= archive_write_disk.3 archive_write_disk_finish_entry.3
193MLINKS+= archive_write_disk.3 archive_write_disk_header.3
194MLINKS+= archive_write_disk.3 archive_write_disk_new.3
195MLINKS+= archive_write_disk.3 archive_write_disk_set_group_lookup.3
196MLINKS+= archive_write_disk.3 archive_write_disk_set_options.3
197MLINKS+= archive_write_disk.3 archive_write_disk_set_skip_file.3
198MLINKS+= archive_write_disk.3 archive_write_disk_set_standard_lookup.3
199MLINKS+= archive_write_disk.3 archive_write_disk_set_user_lookup.3
c4708c74
JS
200MLINKS+= libarchive.3 archive.3
201
202# Build archive.h from archive.h.in
203archive.h: archive.h.in Makefile
204 cat ${CONTRIBDIR}/archive.h.in | \
db6b0fac
PA
205 sed 's/@VERSION@/${VERSION}/g' | \
206 sed 's/@SHLIB_MAJOR@/${SHLIB_MAJOR}/g' | \
207 sed 's/@ARCHIVE_API_MAJOR@/${ARCHIVE_API_MAJOR}/g' | \
208 sed 's/@ARCHIVE_API_MINOR@/${ARCHIVE_API_MINOR}/g' | \
209 sed 's|@ARCHIVE_H_INCLUDE_INTTYPES_H@|#include <inttypes.h> /* For int64_t */|g' | \
c4708c74
JS
210 cat > archive.h
211
212# archive.h needs to be cleaned
213CLEANFILES+= archive.h
214
215.include <bsd.lib.mk>