1 # $FreeBSD: src/lib/libarchive/Makefile,v 1.26 2004/11/05 05:38:15 kientzle Exp $
4 # Use "make distfile" to build a conventional tar.gz archive
5 # complete with autoconf/automake-generated build system.
11 ARCHIVE_API_FEATURE= 2
12 ARCHIVE_API_VERSION= 1
13 SHLIB_MAJOR= ${ARCHIVE_API_VERSION}
14 CFLAGS+= -DPACKAGE_NAME=\"lib${LIB}\"
15 CFLAGS+= -DPACKAGE_VERSION=\"${VERSION}\"
18 .if ${MACHINE_ARCH} == "arm"
24 INCS= archive.h archive_entry.h
26 # Note: archive.h does need to be listed here, since it's built
28 archive_check_magic.c \
31 archive_read_data_into_buffer.c \
32 archive_read_data_into_fd.c \
33 archive_read_extract.c \
34 archive_read_open_fd.c \
35 archive_read_open_file.c \
36 archive_read_support_compression_all.c \
37 archive_read_support_compression_bzip2.c \
38 archive_read_support_compression_compress.c \
39 archive_read_support_compression_gzip.c \
40 archive_read_support_compression_none.c \
41 archive_read_support_format_all.c \
42 archive_read_support_format_cpio.c \
43 archive_read_support_format_tar.c \
45 archive_string_sprintf.c \
48 archive_write_open_fd.c \
49 archive_write_open_file.c \
50 archive_write_set_compression_bzip2.c \
51 archive_write_set_compression_gzip.c \
52 archive_write_set_compression_none.c \
53 archive_write_set_format.c \
54 archive_write_set_format_by_name.c \
55 archive_write_set_format_cpio.c \
56 archive_write_set_format_pax.c \
57 archive_write_set_format_shar.c \
58 archive_write_set_format_ustar.c
60 MAN= archive_entry.3 \
65 libarchive-formats.5 \
68 MLINKS+= archive_entry.3 archive_entry_acl_add_entry.3
69 MLINKS+= archive_entry.3 archive_entry_acl_add_entry_w.3
70 MLINKS+= archive_entry.3 archive_entry_acl_clear.3
71 MLINKS+= archive_entry.3 archive_entry_acl_count.3
72 MLINKS+= archive_entry.3 archive_entry_acl_next.3
73 MLINKS+= archive_entry.3 archive_entry_acl_next_w.3
74 MLINKS+= archive_entry.3 archive_entry_acl_reset.3
75 MLINKS+= archive_entry.3 archive_entry_acl_text_w.3
76 MLINKS+= archive_entry.3 archive_entry_clear.3
77 MLINKS+= archive_entry.3 archive_entry_clone.3
78 MLINKS+= archive_entry.3 archive_entry_copy_fflags_text_w.3
79 MLINKS+= archive_entry.3 archive_entry_copy_gname_w.3
80 MLINKS+= archive_entry.3 archive_entry_copy_hardlink_w.3
81 MLINKS+= archive_entry.3 archive_entry_copy_pathname_w.3
82 MLINKS+= archive_entry.3 archive_entry_copy_stat.3
83 MLINKS+= archive_entry.3 archive_entry_copy_symlink_w.3
84 MLINKS+= archive_entry.3 archive_entry_copy_uname_w.3
85 MLINKS+= archive_entry.3 archive_entry_fflags.3
86 MLINKS+= archive_entry.3 archive_entry_fflags_text.3
87 MLINKS+= archive_entry.3 archive_entry_free.3
88 MLINKS+= archive_entry.3 archive_entry_gid.3
89 MLINKS+= archive_entry.3 archive_entry_gname.3
90 MLINKS+= archive_entry.3 archive_entry_gname_w.3
91 MLINKS+= archive_entry.3 archive_entry_hardlink.3
92 MLINKS+= archive_entry.3 archive_entry_ino.3
93 MLINKS+= archive_entry.3 archive_entry_mode.3
94 MLINKS+= archive_entry.3 archive_entry_mtime.3
95 MLINKS+= archive_entry.3 archive_entry_mtime_nsec.3
96 MLINKS+= archive_entry.3 archive_entry_new.3
97 MLINKS+= archive_entry.3 archive_entry_pathname.3
98 MLINKS+= archive_entry.3 archive_entry_pathname_w.3
99 MLINKS+= archive_entry.3 archive_entry_rdev.3
100 MLINKS+= archive_entry.3 archive_entry_rdevmajor.3
101 MLINKS+= archive_entry.3 archive_entry_rdevminor.3
102 MLINKS+= archive_entry.3 archive_entry_set_fflags.3
103 MLINKS+= archive_entry.3 archive_entry_set_gid.3
104 MLINKS+= archive_entry.3 archive_entry_set_gname.3
105 MLINKS+= archive_entry.3 archive_entry_set_hardlink.3
106 MLINKS+= archive_entry.3 archive_entry_set_link.3
107 MLINKS+= archive_entry.3 archive_entry_set_mode.3
108 MLINKS+= archive_entry.3 archive_entry_set_pathname.3
109 MLINKS+= archive_entry.3 archive_entry_set_rdevmajor.3
110 MLINKS+= archive_entry.3 archive_entry_set_rdevminor.3
111 MLINKS+= archive_entry.3 archive_entry_set_size.3
112 MLINKS+= archive_entry.3 archive_entry_set_symlink.3
113 MLINKS+= archive_entry.3 archive_entry_set_uid.3
114 MLINKS+= archive_entry.3 archive_entry_set_uname.3
115 MLINKS+= archive_entry.3 archive_entry_size.3
116 MLINKS+= archive_entry.3 archive_entry_stat.3
117 MLINKS+= archive_entry.3 archive_entry_symlink.3
118 MLINKS+= archive_entry.3 archive_entry_uid.3
119 MLINKS+= archive_entry.3 archive_entry_uname.3
120 MLINKS+= archive_entry.3 archive_entry_uname_w.3
121 MLINKS+= archive_read.3 archive_read_data.3
122 MLINKS+= archive_read.3 archive_read_data_block.3
123 MLINKS+= archive_read.3 archive_read_data_into_buffer.3
124 MLINKS+= archive_read.3 archive_read_data_into_fd.3
125 MLINKS+= archive_read.3 archive_read_data_skip.3
126 MLINKS+= archive_read.3 archive_read_extract.3
127 MLINKS+= archive_read.3 archive_read_extract_set_progress_callback.3
128 MLINKS+= archive_read.3 archive_read_finish.3
129 MLINKS+= archive_read.3 archive_read_new.3
130 MLINKS+= archive_read.3 archive_read_next_header.3
131 MLINKS+= archive_read.3 archive_read_open.3
132 MLINKS+= archive_read.3 archive_read_open_fd.3
133 MLINKS+= archive_read.3 archive_read_open_file.3
134 MLINKS+= archive_read.3 archive_read_set_bytes_per_block.3
135 MLINKS+= archive_read.3 archive_read_support_compression_all.3
136 MLINKS+= archive_read.3 archive_read_support_compression_bzip2.3
137 MLINKS+= archive_read.3 archive_read_support_compression_compress.3
138 MLINKS+= archive_read.3 archive_read_support_compression_gzip.3
139 MLINKS+= archive_read.3 archive_read_support_compression_none.3
140 MLINKS+= archive_read.3 archive_read_support_format_all.3
141 MLINKS+= archive_read.3 archive_read_support_format_cpio.3
142 MLINKS+= archive_read.3 archive_read_support_format_tar.3
143 MLINKS+= archive_util.3 archive_compression.3
144 MLINKS+= archive_util.3 archive_compression_name.3
145 MLINKS+= archive_util.3 archive_errno.3
146 MLINKS+= archive_util.3 archive_error_string.3
147 MLINKS+= archive_util.3 archive_format.3
148 MLINKS+= archive_util.3 archive_format_name.3
149 MLINKS+= archive_util.3 archive_set_error.3
150 MLINKS+= archive_write.3 archive_write_data.3
151 MLINKS+= archive_write.3 archive_write_finish.3
152 MLINKS+= archive_write.3 archive_write_header.3
153 MLINKS+= archive_write.3 archive_write_new.3
154 MLINKS+= archive_write.3 archive_write_open.3
155 MLINKS+= archive_write.3 archive_write_open_fd.3
156 MLINKS+= archive_write.3 archive_write_open_file.3
157 MLINKS+= archive_write.3 archive_write_prepare.3
158 MLINKS+= archive_write.3 archive_write_set_bytes_per_block.3
159 MLINKS+= archive_write.3 archive_write_set_bytes_in_last_block.3
160 MLINKS+= archive_write.3 archive_write_set_callbacks.3
161 MLINKS+= archive_write.3 archive_write_set_compression_bzip2.3
162 MLINKS+= archive_write.3 archive_write_set_compression_gzip.3
163 MLINKS+= archive_write.3 archive_write_set_format_pax.3
164 MLINKS+= archive_write.3 archive_write_set_format_shar.3
165 MLINKS+= archive_write.3 archive_write_set_format_ustar.3
166 MLINKS+= libarchive.3 archive.3
168 # Build archive.h from archive.h.in
169 archive.h: archive.h.in Makefile
170 cat ${.CURDIR}/archive.h.in | \
171 sed 's/@ARCHIVE_API_VERSION@/${ARCHIVE_API_VERSION}/' | \
172 sed 's/@ARCHIVE_API_FEATURE@/${ARCHIVE_API_FEATURE}/' | \
175 # archive.h needs to be cleaned
176 CLEANFILES+= archive.h
179 # Voodoo for building a distfile that uses autoconf/automake/etc.
182 # Files that just get copied to the distfile build directory
183 DIST_WORK_DIR= ${.OBJDIR}/lib${LIB}-${VERSION}
184 CLEANDIRS+= ${DIST_WORK_DIR}
185 DISTFILE= lib${LIB}-${VERSION}.tar.gz
188 DIST_FILES+= archive.h.in
189 DIST_FILES+= archive_entry.h archive_platform.h
190 DIST_FILES+= archive_private.h archive_string.h
191 DIST_FILES+= Makefile.am
194 rm -rf ${DIST_WORK_DIR}
195 mkdir ${DIST_WORK_DIR}
196 for f in ${DIST_FILES}; \
198 cat ${.CURDIR}/$$f >${DIST_WORK_DIR}/$$f || true; \
200 cat ${.CURDIR}/configure.ac.in | \
201 sed 's/@VERSION@/${VERSION}/' | \
202 cat > ${DIST_WORK_DIR}/configure.ac
203 (cd ${DIST_WORK_DIR} && aclocal && autoheader && autoconf && automake -a --foreign)
204 (cd ${DIST_WORK_DIR} && ./configure && make distcheck && make dist)
205 mv ${DIST_WORK_DIR}/${DISTFILE} ${.OBJDIR}
206 @echo ==================================================
207 @echo Created ${.OBJDIR}/${DISTFILE}
208 @echo ==================================================
210 .include <bsd.lib.mk>