1# $FreeBSD$ 2.include <bsd.own.mk> 3 4LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive 5 6PROG= bsdtar 7BSDTAR_VERSION_STRING=2.8.5 8 9.PATH: ${LIBARCHIVEDIR}/tar 10SRCS= bsdtar.c \ 11 cmdline.c \ 12 getdate.c \ 13 read.c \ 14 subst.c \ 15 tree.c \ 16 util.c \ 17 write.c 18 19.PATH: ${LIBARCHIVEDIR}/libarchive_fe 20SRCS+= err.c \ 21 line_reader.c \ 22 matching.c \ 23 pathmatch.c 24 25DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA} ${LIBBSDXML} 26LDADD= -larchive -lbz2 -lz -llzma -lbsdxml 27.if ${MK_OPENSSL} != "no" 28DPADD+= ${LIBCRYPTO} 29LDADD+= -lcrypto 30.else 31DPADD+= ${LIBMD} 32LDADD+= -lmd 33.endif 34 35CFLAGS+= -DBSDTAR_VERSION_STRING=\"${BSDTAR_VERSION_STRING}\" 36CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/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