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