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