1# $FreeBSD$ 2 3.include <bsd.own.mk> 4 5PROG= bsdcpio 6BSDCPIO_VERSION_STRING=2.8.4 7 8SRCS= cpio.c cmdline.c 9 10.PATH: ${.CURDIR}/../../lib/libarchive/libarchive_fe 11SRCS+= err.c line_reader.c matching.c pathmatch.c 12 13CFLAGS+= -DBSDCPIO_VERSION_STRING=\"${BSDCPIO_VERSION_STRING}\" 14CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" 15CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../lib/libarchive/libarchive_fe 16 17.ifdef RELEASE_CRUNCH 18# FreeBSD's installer uses cpio in crunched binaries that are 19# statically linked, cannot use -lcrypto, and are size sensitive. 20CFLAGS+= -DSMALLER 21.endif 22DPADD= ${LIBARCHIVE} ${LIBZ} ${LIBBZ2} ${LIBLZMA} ${LIBBSDXML} 23LDADD= -larchive -lz -lbz2 -llzma -lbsdxml 24.if ${MK_OPENSSL} != "no" 25DPADD+= ${LIBCRYPTO} 26LDADD+= -lcrypto 27.else 28DPADD+= ${LIBMD} 29LDADD+= -lmd 30.endif 31 32SYMLINKS=bsdcpio ${BINDIR}/cpio 33MLINKS= bsdcpio.1 cpio.1 34 35.PHONY: check test 36 37check test: $(PROG) bsdcpio.1.gz 38 cd ${.CURDIR}/test && make clean test 39 40.include <bsd.prog.mk> 41