1# $FreeBSD$ 2 3.include <src.opts.mk> 4 5_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive 6_LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive 7 8PROG= bsdcpio 9BSDCPIO_VERSION_STRING!= sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \ 10 ${_LIBARCHIVEDIR}/libarchive/archive.h 11 12.PATH: ${_LIBARCHIVEDIR}/cpio 13SRCS= cpio.c cmdline.c 14 15.PATH: ${_LIBARCHIVEDIR}/libarchive_fe 16SRCS+= err.c line_reader.c passphrase.c 17 18CFLAGS+= -DBSDCPIO_VERSION_STRING=\"${BSDCPIO_VERSION_STRING}\" 19CFLAGS+= -DPLATFORM_CONFIG_H=\"${_LIBARCHIVECONFDIR}/config_freebsd.h\" 20CFLAGS+= -I${_LIBARCHIVEDIR}/cpio -I${_LIBARCHIVEDIR}/libarchive_fe 21 22LIBADD= archive 23 24.if ${MK_ICONV} != "no" 25CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const 26.endif 27 28SYMLINKS=bsdcpio ${BINDIR}/cpio 29MLINKS= bsdcpio.1 cpio.1 30 31HAS_TESTS= 32SUBDIR.${MK_TESTS}+= tests 33 34.include <bsd.prog.mk> 35