xref: /freebsd/usr.bin/cpio/Makefile (revision e9ac41698b2f322d55ccf9da50a3596edb2c1800)
1c6063d0dSWarner Losh.include <src.opts.mk>
2482ff785SDoug Barton
3a35f04fbSWarner Losh_LIBARCHIVEDIR=	${SRCTOP}/contrib/libarchive
4a35f04fbSWarner Losh_LIBARCHIVECONFDIR=	${SRCTOP}/lib/libarchive
545d3b226SMartin Matuska
61e38350bSTim KientzlePROG=	bsdcpio
7*2ff66a91SXin LIBSDCPIO_VERSION_STRING!=	sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \
8*2ff66a91SXin LI			${_LIBARCHIVEDIR}/libarchive/archive.h
9f305d4beSMartin Matuska
103c89d6b0SBryan Drewery.PATH:	${_LIBARCHIVEDIR}/cpio
11f305d4beSMartin MatuskaSRCS=	cpio.c cmdline.c
12f305d4beSMartin Matuska
133c89d6b0SBryan Drewery.PATH:	${_LIBARCHIVEDIR}/libarchive_fe
14cdf63a70SMartin MatuskaSRCS+=	err.c line_reader.c passphrase.c
15f305d4beSMartin Matuska
161e38350bSTim KientzleCFLAGS+= -DBSDCPIO_VERSION_STRING=\"${BSDCPIO_VERSION_STRING}\"
173c89d6b0SBryan DreweryCFLAGS+= -DPLATFORM_CONFIG_H=\"${_LIBARCHIVECONFDIR}/config_freebsd.h\"
183c89d6b0SBryan DreweryCFLAGS+= -I${_LIBARCHIVEDIR}/cpio -I${_LIBARCHIVEDIR}/libarchive_fe
19f305d4beSMartin Matuska
203e11bd9eSBaptiste DaroussinLIBADD=	archive
214d6b2b93STim Kientzle
226c95142eSMartin Matuska.if ${MK_ICONV} != "no"
236c95142eSMartin MatuskaCFLAGS+=	-DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const
246c95142eSMartin Matuska.endif
256c95142eSMartin Matuska
261e38350bSTim KientzleSYMLINKS=bsdcpio ${BINDIR}/cpio
271e38350bSTim KientzleMLINKS= bsdcpio.1 cpio.1
281e38350bSTim Kientzle
29d511b20aSEnji CooperHAS_TESTS=
304b330699SEnji CooperSUBDIR.${MK_TESTS}+= tests
311e38350bSTim Kientzle
321e38350bSTim Kientzle.include <bsd.prog.mk>
33