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