Makefile revision 133257
1# $FreeBSD: head/lib/libarchive/Makefile 133257 2004-08-07 06:38:40Z kientzle $ 2 3# 4# Use "make distfile" to build a conventional tar.gz archive 5# complete with autoconf/automake-generated build system. 6# 7 8 9LIB= archive 10SHLIB_MAJOR= 1 11VERSION= 1.00.009 12ARCHIVE_API_FEATURE= 1 13CFLAGS+= -DPACKAGE_NAME=\"lib${LIB}\" 14CFLAGS+= -DPACKAGE_VERSION=\"${VERSION}\" 15CFLAGS+= -I${.OBJDIR} 16 17.if ${MACHINE_ARCH} == "arm" 18WARNS?= 3 19.else 20WARNS?= 6 21.endif 22 23# I'm not yet ready for a shared version of this library, as 24# there are a couple of API changes still in the works. 25NOPIC= 1 26 27INCS= archive.h archive_entry.h 28 29SRCS= archive_check_magic.c \ 30 archive_entry.c \ 31 archive_read.c \ 32 archive_read_data_into_buffer.c \ 33 archive_read_data_into_fd.c \ 34 archive_read_extract.c \ 35 archive_read_open_fd.c \ 36 archive_read_open_file.c \ 37 archive_read_support_compression_all.c \ 38 archive_read_support_compression_bzip2.c \ 39 archive_read_support_compression_compress.c \ 40 archive_read_support_compression_gzip.c \ 41 archive_read_support_compression_none.c \ 42 archive_read_support_format_all.c \ 43 archive_read_support_format_cpio.c \ 44 archive_read_support_format_tar.c \ 45 archive_string.c \ 46 archive_string_sprintf.c \ 47 archive_util.c \ 48 archive_write.c \ 49 archive_write_open_fd.c \ 50 archive_write_open_file.c \ 51 archive_write_set_compression_bzip2.c \ 52 archive_write_set_compression_gzip.c \ 53 archive_write_set_compression_none.c \ 54 archive_write_set_format.c \ 55 archive_write_set_format_by_name.c \ 56 archive_write_set_format_cpio.c \ 57 archive_write_set_format_pax.c \ 58 archive_write_set_format_shar.c \ 59 archive_write_set_format_ustar.c 60 61MAN= archive_entry.3 \ 62 archive_read.3 \ 63 archive_util.3 \ 64 archive_write.3 \ 65 libarchive.3 \ 66 libarchive-formats.5 \ 67 tar.5 68 69MLINKS+= archive_entry.3 archive_entry_acl_add_entry.3 70MLINKS+= archive_entry.3 archive_entry_acl_add_entry_w.3 71MLINKS+= archive_entry.3 archive_entry_acl_clear.3 72MLINKS+= archive_entry.3 archive_entry_acl_count.3 73MLINKS+= archive_entry.3 archive_entry_acl_next.3 74MLINKS+= archive_entry.3 archive_entry_acl_next_w.3 75MLINKS+= archive_entry.3 archive_entry_acl_reset.3 76MLINKS+= archive_entry.3 archive_entry_acl_text_w.3 77MLINKS+= archive_entry.3 archive_entry_clear.3 78MLINKS+= archive_entry.3 archive_entry_clone.3 79MLINKS+= archive_entry.3 archive_entry_copy_fflags_text_w.3 80MLINKS+= archive_entry.3 archive_entry_copy_gname_w.3 81MLINKS+= archive_entry.3 archive_entry_copy_hardlink_w.3 82MLINKS+= archive_entry.3 archive_entry_copy_pathname_w.3 83MLINKS+= archive_entry.3 archive_entry_copy_stat.3 84MLINKS+= archive_entry.3 archive_entry_copy_symlink_w.3 85MLINKS+= archive_entry.3 archive_entry_copy_uname_w.3 86MLINKS+= archive_entry.3 archive_entry_fflags.3 87MLINKS+= archive_entry.3 archive_entry_fflags_text.3 88MLINKS+= archive_entry.3 archive_entry_free.3 89MLINKS+= archive_entry.3 archive_entry_gid.3 90MLINKS+= archive_entry.3 archive_entry_gname.3 91MLINKS+= archive_entry.3 archive_entry_gname_w.3 92MLINKS+= archive_entry.3 archive_entry_hardlink.3 93MLINKS+= archive_entry.3 archive_entry_ino.3 94MLINKS+= archive_entry.3 archive_entry_mode.3 95MLINKS+= archive_entry.3 archive_entry_mtime.3 96MLINKS+= archive_entry.3 archive_entry_mtime_nsec.3 97MLINKS+= archive_entry.3 archive_entry_new.3 98MLINKS+= archive_entry.3 archive_entry_pathname.3 99MLINKS+= archive_entry.3 archive_entry_pathname_w.3 100MLINKS+= archive_entry.3 archive_entry_rdev.3 101MLINKS+= archive_entry.3 archive_entry_rdevmajor.3 102MLINKS+= archive_entry.3 archive_entry_rdevminor.3 103MLINKS+= archive_entry.3 archive_entry_set_fflags.3 104MLINKS+= archive_entry.3 archive_entry_set_gid.3 105MLINKS+= archive_entry.3 archive_entry_set_gname.3 106MLINKS+= archive_entry.3 archive_entry_set_hardlink.3 107MLINKS+= archive_entry.3 archive_entry_set_link.3 108MLINKS+= archive_entry.3 archive_entry_set_mode.3 109MLINKS+= archive_entry.3 archive_entry_set_pathname.3 110MLINKS+= archive_entry.3 archive_entry_set_rdevmajor.3 111MLINKS+= archive_entry.3 archive_entry_set_rdevminor.3 112MLINKS+= archive_entry.3 archive_entry_set_size.3 113MLINKS+= archive_entry.3 archive_entry_set_symlink.3 114MLINKS+= archive_entry.3 archive_entry_set_uid.3 115MLINKS+= archive_entry.3 archive_entry_set_uname.3 116MLINKS+= archive_entry.3 archive_entry_size.3 117MLINKS+= archive_entry.3 archive_entry_stat.3 118MLINKS+= archive_entry.3 archive_entry_symlink.3 119MLINKS+= archive_entry.3 archive_entry_uid.3 120MLINKS+= archive_entry.3 archive_entry_uname.3 121MLINKS+= archive_entry.3 archive_entry_uname_w.3 122MLINKS+= archive_read.3 archive_read_data.3 123MLINKS+= archive_read.3 archive_read_data_block.3 124MLINKS+= archive_read.3 archive_read_data_into_buffer.3 125MLINKS+= archive_read.3 archive_read_data_into_fd.3 126MLINKS+= archive_read.3 archive_read_data_skip.3 127MLINKS+= archive_read.3 archive_read_extract.3 128MLINKS+= archive_read.3 archive_read_extract_set_progress_callback.3 129MLINKS+= archive_read.3 archive_read_finish.3 130MLINKS+= archive_read.3 archive_read_new.3 131MLINKS+= archive_read.3 archive_read_next_header.3 132MLINKS+= archive_read.3 archive_read_open.3 133MLINKS+= archive_read.3 archive_read_open_fd.3 134MLINKS+= archive_read.3 archive_read_open_file.3 135MLINKS+= archive_read.3 archive_read_set_bytes_per_block.3 136MLINKS+= archive_read.3 archive_read_support_compression_all.3 137MLINKS+= archive_read.3 archive_read_support_compression_bzip2.3 138MLINKS+= archive_read.3 archive_read_support_compression_compress.3 139MLINKS+= archive_read.3 archive_read_support_compression_gzip.3 140MLINKS+= archive_read.3 archive_read_support_compression_none.3 141MLINKS+= archive_read.3 archive_read_support_format_all.3 142MLINKS+= archive_read.3 archive_read_support_format_cpio.3 143MLINKS+= archive_read.3 archive_read_support_format_tar.3 144MLINKS+= archive_util.3 archive_compression.3 145MLINKS+= archive_util.3 archive_compression_name.3 146MLINKS+= archive_util.3 archive_errno.3 147MLINKS+= archive_util.3 archive_error_string.3 148MLINKS+= archive_util.3 archive_format.3 149MLINKS+= archive_util.3 archive_format_name.3 150MLINKS+= archive_write.3 archive_write_data.3 151MLINKS+= archive_write.3 archive_write_finish.3 152MLINKS+= archive_write.3 archive_write_header.3 153MLINKS+= archive_write.3 archive_write_new.3 154MLINKS+= archive_write.3 archive_write_open.3 155MLINKS+= archive_write.3 archive_write_open_fd.3 156MLINKS+= archive_write.3 archive_write_open_file.3 157MLINKS+= archive_write.3 archive_write_prepare.3 158MLINKS+= archive_write.3 archive_write_set_bytes_per_block.3 159MLINKS+= archive_write.3 archive_write_set_bytes_in_last_block.3 160MLINKS+= archive_write.3 archive_write_set_callbacks.3 161MLINKS+= archive_write.3 archive_write_set_compression_bzip2.3 162MLINKS+= archive_write.3 archive_write_set_compression_gzip.3 163MLINKS+= archive_write.3 archive_write_set_format_pax.3 164MLINKS+= archive_write.3 archive_write_set_format_shar.3 165MLINKS+= archive_write.3 archive_write_set_format_ustar.3 166MLINKS+= libarchive.3 archive.3 167 168# 169# archive.h is built dynamically, which has a number of implications... 170# 171 172# Ensure archive.h gets built before we compute dependencies. 173beforedepend: archive.h 174afterdepend: 175 echo "archive.h: Makefile" >> ${DEPENDFILE} 176# Ensure archive.h gets built before we compile anything. 177${SRCS:S/.c$/.o/}: archive.h 178 179# archive.h needs to be cleaned 180CLEANFILES+= archive.h 181 182# Build archive.h from archive.h.in 183archive.h: archive.h.in Makefile 184 cat ${.CURDIR}/archive.h.in | \ 185 sed 's/@ARCHIVE_API_VERSION@/${SHLIB_MAJOR}/' | \ 186 sed 's/@ARCHIVE_API_FEATURE@/${ARCHIVE_API_FEATURE}/' | \ 187 cat > archive.h 188 189# Files that just get copied to the distfile build directory 190DIST_WORK_DIR= ${.OBJDIR}/lib${LIB}-${VERSION} 191DISTFILE= lib${LIB}-${VERSION}.tar.gz 192DIST_FILES= ${SRCS} 193DIST_FILES+= ${MAN} 194DIST_FILES+= archive.h.in 195DIST_FILES+= archive_entry.h archive_platform.h 196DIST_FILES+= archive_private.h archive_string.h 197DIST_FILES+= Makefile.am 198 199CLEANDIRS+= ${DIST_WORK_DIR} 200 201distfile: 202 rm -rf ${DIST_WORK_DIR} 203 mkdir ${DIST_WORK_DIR} 204 for f in ${DIST_FILES}; \ 205 do \ 206 cat ${.CURDIR}/$$f >${DIST_WORK_DIR}/$$f; \ 207 done 208 cat ${.CURDIR}/configure.ac.in | \ 209 sed 's/@VERSION@/${VERSION}/' | \ 210 cat > ${DIST_WORK_DIR}/configure.ac 211 (cd ${DIST_WORK_DIR} && aclocal && autoheader && autoconf && automake -a --foreign) 212 (cd ${DIST_WORK_DIR} && ./configure && make distcheck && make dist) 213 mv ${DIST_WORK_DIR}/${DISTFILE} ${.OBJDIR} 214 @echo ================================================== 215 @echo Created ${.OBJDIR}/${DISTFILE} 216 @echo ================================================== 217 218.include <bsd.lib.mk> 219