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
|
|
|
|
2011-12-22 08:42:07 +00:00
|
|
|
LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive
|
2012-02-25 10:58:02 +00:00
|
|
|
LIBARCHIVECONFDIR= ${.CURDIR}/../../lib/libarchive
|
2011-12-22 08:42:07 +00:00
|
|
|
|
2008-05-26 17:15:35 +00:00
|
|
|
PROG= bsdcpio
|
2013-03-22 13:36:03 +00:00
|
|
|
BSDCPIO_VERSION_STRING= 3.1.2
|
2011-07-17 21:42:22 +00:00
|
|
|
|
2011-12-22 08:42:07 +00:00
|
|
|
.PATH: ${LIBARCHIVEDIR}/cpio
|
2011-07-17 21:42:22 +00:00
|
|
|
SRCS= cpio.c cmdline.c
|
|
|
|
|
2011-12-22 08:42:07 +00:00
|
|
|
.PATH: ${LIBARCHIVEDIR}/libarchive_fe
|
2012-07-28 06:38:44 +00:00
|
|
|
SRCS+= err.c line_reader.c
|
2011-07-17 21:42:22 +00:00
|
|
|
|
2008-05-26 17:15:35 +00:00
|
|
|
CFLAGS+= -DBSDCPIO_VERSION_STRING=\"${BSDCPIO_VERSION_STRING}\"
|
2012-02-25 10:58:02 +00:00
|
|
|
CFLAGS+= -DPLATFORM_CONFIG_H=\"${LIBARCHIVECONFDIR}/config_freebsd.h\"
|
2011-12-22 08:42:07 +00:00
|
|
|
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
|
|
|
|
|
2011-12-22 08:42:07 +00:00
|
|
|
.PHONY: check test clean-test
|
2008-05-26 17:15:35 +00:00
|
|
|
|
|
|
|
check test: $(PROG) bsdcpio.1.gz
|
2011-12-22 08:42:07 +00:00
|
|
|
cd ${.CURDIR}/test && make obj && make test
|
|
|
|
|
|
|
|
clean-test:
|
|
|
|
cd ${.CURDIR}/test && make clean
|
2008-05-26 17:15:35 +00:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|