1# $FreeBSD$ 2.include <bsd.own.mk> 3 4LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive 5 6PROG= bsdtar 7BSDTAR_VERSION_STRING= 3.0.3 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 35.if ${MK_ICONV} != "no" 36CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const 37.endif 38 39CFLAGS+= -DBSDTAR_VERSION_STRING=\"${BSDTAR_VERSION_STRING}\" 40CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/../../lib/libarchive/config_freebsd.h\" 41CFLAGS+= -I${LIBARCHIVEDIR}/tar -I${LIBARCHIVEDIR}/libarchive 42CFLAGS+= -I${LIBARCHIVEDIR}/libarchive_fe 43SYMLINKS= bsdtar ${BINDIR}/tar 44MLINKS= bsdtar.1 tar.1 45DEBUG_FLAGS=-g 46 47.PHONY: check test clean-test 48check test: $(PROG) bsdtar.1.gz 49 cd ${.CURDIR}/test && make obj && make test 50 51clean-test: 52 cd ${.CURDIR}/test && make clean 53 54.include <bsd.prog.mk> 55