1# $FreeBSD$ 2 3.include <src.opts.mk> 4 5LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive 6LIBARCHIVECONFDIR= ${.CURDIR}/../../lib/libarchive 7 8PROG= bsdcpio 9BSDCPIO_VERSION_STRING= 3.1.2 10 11.PATH: ${LIBARCHIVEDIR}/cpio 12SRCS= cpio.c cmdline.c 13 14.PATH: ${LIBARCHIVEDIR}/libarchive_fe 15SRCS+= err.c line_reader.c 16 17CFLAGS+= -DBSDCPIO_VERSION_STRING=\"${BSDCPIO_VERSION_STRING}\" 18CFLAGS+= -DPLATFORM_CONFIG_H=\"${LIBARCHIVECONFDIR}/config_freebsd.h\" 19CFLAGS+= -I${LIBARCHIVEDIR}/cpio -I${LIBARCHIVEDIR}/libarchive_fe 20 21.ifdef RELEASE_CRUNCH 22# FreeBSD's installer uses cpio in crunched binaries that are 23# statically linked, cannot use -lcrypto, and are size sensitive. 24CFLAGS+= -DSMALLER 25.endif 26LIBADD= archive 27 28.if ${MK_ICONV} != "no" 29CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const 30.endif 31 32SYMLINKS=bsdcpio ${BINDIR}/cpio 33MLINKS= bsdcpio.1 cpio.1 34 35.PHONY: check test clean-test 36 37check test: $(PROG) bsdcpio.1.gz 38 cd ${.CURDIR}/test && make obj && make test 39 40clean-test: 41 cd ${.CURDIR}/test && make clean 42 43.include <bsd.prog.mk> 44