1cdf63a70SMartin Matuska.include <src.opts.mk> 2cdf63a70SMartin Matuska 3ebbfcadaSEnji Cooper_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive 4ebbfcadaSEnji Cooper_LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive 5cdf63a70SMartin Matuska 6cdf63a70SMartin MatuskaPROG= bsdcat 7*2ff66a91SXin LIBSDCAT_VERSION_STRING!= sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \ 8*2ff66a91SXin LI ${_LIBARCHIVEDIR}/libarchive/archive.h 9cdf63a70SMartin Matuska 10cdf63a70SMartin Matuska.PATH: ${_LIBARCHIVEDIR}/cat 11cdf63a70SMartin MatuskaSRCS= bsdcat.c cmdline.c 12cdf63a70SMartin Matuska 13cdf63a70SMartin Matuska.PATH: ${_LIBARCHIVEDIR}/libarchive_fe 14cdf63a70SMartin MatuskaSRCS+= err.c 15cdf63a70SMartin Matuska 16cdf63a70SMartin MatuskaCFLAGS+= -DBSDCAT_VERSION_STRING=\"${BSDCAT_VERSION_STRING}\" 17cdf63a70SMartin MatuskaCFLAGS+= -DPLATFORM_CONFIG_H=\"${_LIBARCHIVECONFDIR}/config_freebsd.h\" 18cdf63a70SMartin MatuskaCFLAGS+= -I${_LIBARCHIVEDIR}/cat -I${_LIBARCHIVEDIR}/libarchive_fe 19cdf63a70SMartin Matuska 20cdf63a70SMartin MatuskaLIBADD= archive 21cdf63a70SMartin Matuska 22cdf63a70SMartin Matuska.if ${MK_ICONV} != "no" 23cdf63a70SMartin MatuskaCFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const 24cdf63a70SMartin Matuska.endif 25cdf63a70SMartin Matuska 26d511b20aSEnji CooperHAS_TESTS= 274b330699SEnji CooperSUBDIR.${MK_TESTS}+= tests 28cdf63a70SMartin Matuska 29cdf63a70SMartin Matuska.include <bsd.prog.mk> 30