1# $FreeBSD$ 2.include <src.opts.mk> 3 4LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive 5 6PROG= bsdtar 7BSDTAR_VERSION_STRING= 3.1.2 8 9.PATH: ${LIBARCHIVEDIR}/tar 10SRCS= bsdtar.c \ 11 cmdline.c \ 12 creation_set.c \ 13 read.c \ 14 subst.c \ 15 util.c \ 16 write.c 17 18.PATH: ${LIBARCHIVEDIR}/libarchive_fe 19SRCS+= err.c \ 20 line_reader.c 21 22DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA} ${LIBBSDXML} 23LDADD= -larchive -lbz2 -lz -llzma -lbsdxml 24.if ${MK_OPENSSL} != "no" 25DPADD+= ${LIBCRYPTO} 26LDADD+= -lcrypto 27.else 28DPADD+= ${LIBMD} 29LDADD+= -lmd 30.endif 31 32.if ${MK_ICONV} != "no" 33CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const 34.endif 35 36CFLAGS+= -DBSDTAR_VERSION_STRING=\"${BSDTAR_VERSION_STRING}\" 37CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/../../lib/libarchive/config_freebsd.h\" 38CFLAGS+= -I${LIBARCHIVEDIR}/tar -I${LIBARCHIVEDIR}/libarchive 39CFLAGS+= -I${LIBARCHIVEDIR}/libarchive_fe 40SYMLINKS= bsdtar ${BINDIR}/tar 41MLINKS= bsdtar.1 tar.1 42DEBUG_FLAGS=-g 43 44.PHONY: check test clean-test 45check test: $(PROG) bsdtar.1.gz 46 cd ${.CURDIR}/test && make obj && make test 47 48clean-test: 49 cd ${.CURDIR}/test && make clean 50 51.include <bsd.prog.mk> 52