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