2008-05-26 17:15:35 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2014-05-06 04:22:01 +00:00
|
|
|
.include <src.opts.mk>
|
2008-06-16 07:24:05 +00:00
|
|
|
|
2017-03-12 18:58:44 +00:00
|
|
|
_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive
|
|
|
|
_LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive
|
2011-12-22 08:42:07 +00:00
|
|
|
|
2008-05-26 17:15:35 +00:00
|
|
|
PROG= bsdcpio
|
2017-07-13 00:28:36 +00:00
|
|
|
BSDCPIO_VERSION_STRING= 3.3.2
|
2011-07-17 21:42:22 +00:00
|
|
|
|
2015-12-01 22:20:04 +00:00
|
|
|
.PATH: ${_LIBARCHIVEDIR}/cpio
|
2011-07-17 21:42:22 +00:00
|
|
|
SRCS= cpio.c cmdline.c
|
|
|
|
|
2015-12-01 22:20:04 +00:00
|
|
|
.PATH: ${_LIBARCHIVEDIR}/libarchive_fe
|
2016-05-12 10:16:16 +00:00
|
|
|
SRCS+= err.c line_reader.c passphrase.c
|
2011-07-17 21:42:22 +00:00
|
|
|
|
2008-05-26 17:15:35 +00:00
|
|
|
CFLAGS+= -DBSDCPIO_VERSION_STRING=\"${BSDCPIO_VERSION_STRING}\"
|
2015-12-01 22:20:04 +00:00
|
|
|
CFLAGS+= -DPLATFORM_CONFIG_H=\"${_LIBARCHIVECONFDIR}/config_freebsd.h\"
|
|
|
|
CFLAGS+= -I${_LIBARCHIVEDIR}/cpio -I${_LIBARCHIVEDIR}/libarchive_fe
|
2011-07-17 21:42:22 +00:00
|
|
|
|
2009-04-19 06:59:12 +00:00
|
|
|
.ifdef RELEASE_CRUNCH
|
|
|
|
# FreeBSD's installer uses cpio in crunched binaries that are
|
|
|
|
# statically linked, cannot use -lcrypto, and are size sensitive.
|
|
|
|
CFLAGS+= -DSMALLER
|
|
|
|
.endif
|
2014-11-25 14:29:10 +00:00
|
|
|
LIBADD= archive
|
2008-05-26 17:17:43 +00:00
|
|
|
|
2012-02-25 10:58:02 +00:00
|
|
|
.if ${MK_ICONV} != "no"
|
|
|
|
CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const
|
|
|
|
.endif
|
|
|
|
|
2008-05-26 17:15:35 +00:00
|
|
|
SYMLINKS=bsdcpio ${BINDIR}/cpio
|
|
|
|
MLINKS= bsdcpio.1 cpio.1
|
|
|
|
|
2017-08-02 08:35:51 +00:00
|
|
|
SUBDIR.${MK_TESTS}+= tests
|
2008-05-26 17:15:35 +00:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|