1# $FreeBSD$ 2 3.include <src.opts.mk> 4 5_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive 6_LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive 7 8PROG= bsdcat 9BSDCAT_VERSION_STRING!= sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \ 10 ${_LIBARCHIVEDIR}/libarchive/archive.h 11 12.PATH: ${_LIBARCHIVEDIR}/cat 13SRCS= bsdcat.c cmdline.c 14 15.PATH: ${_LIBARCHIVEDIR}/libarchive_fe 16SRCS+= err.c 17 18CFLAGS+= -DBSDCAT_VERSION_STRING=\"${BSDCAT_VERSION_STRING}\" 19CFLAGS+= -DPLATFORM_CONFIG_H=\"${_LIBARCHIVECONFDIR}/config_freebsd.h\" 20CFLAGS+= -I${_LIBARCHIVEDIR}/cat -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 28HAS_TESTS= 29SUBDIR.${MK_TESTS}+= tests 30 31.include <bsd.prog.mk> 32