2004-04-05 21:32:18 +00:00
|
|
|
# $FreeBSD$
|
2009-04-18 06:03:09 +00:00
|
|
|
.include <bsd.own.mk>
|
2004-04-05 21:32:18 +00:00
|
|
|
|
2011-12-22 08:42:07 +00:00
|
|
|
LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive
|
|
|
|
|
2004-04-05 21:32:18 +00:00
|
|
|
PROG= bsdtar
|
2011-12-20 20:06:33 +00:00
|
|
|
BSDTAR_VERSION_STRING=2.8.5
|
2011-12-22 08:42:07 +00:00
|
|
|
|
|
|
|
.PATH: ${LIBARCHIVEDIR}/tar
|
2010-02-06 19:53:48 +00:00
|
|
|
SRCS= bsdtar.c \
|
|
|
|
cmdline.c \
|
|
|
|
getdate.c \
|
|
|
|
read.c \
|
|
|
|
subst.c \
|
|
|
|
tree.c \
|
|
|
|
util.c \
|
|
|
|
write.c
|
2011-07-17 21:33:15 +00:00
|
|
|
|
2011-12-22 08:42:07 +00:00
|
|
|
.PATH: ${LIBARCHIVEDIR}/libarchive_fe
|
2011-07-17 21:33:15 +00:00
|
|
|
SRCS+= err.c \
|
|
|
|
line_reader.c \
|
|
|
|
matching.c \
|
|
|
|
pathmatch.c
|
|
|
|
|
2011-08-01 08:22:40 +00:00
|
|
|
DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA} ${LIBBSDXML}
|
|
|
|
LDADD= -larchive -lbz2 -lz -llzma -lbsdxml
|
2009-04-18 06:03:09 +00:00
|
|
|
.if ${MK_OPENSSL} != "no"
|
2010-02-25 20:24:19 +00:00
|
|
|
DPADD+= ${LIBCRYPTO}
|
2009-04-18 06:03:09 +00:00
|
|
|
LDADD+= -lcrypto
|
2011-08-01 08:22:40 +00:00
|
|
|
.else
|
|
|
|
DPADD+= ${LIBMD}
|
|
|
|
LDADD+= -lmd
|
2009-04-18 06:03:09 +00:00
|
|
|
.endif
|
2011-08-01 08:22:40 +00:00
|
|
|
|
2008-01-02 00:27:14 +00:00
|
|
|
CFLAGS+= -DBSDTAR_VERSION_STRING=\"${BSDTAR_VERSION_STRING}\"
|
2011-12-22 08:42:07 +00:00
|
|
|
CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\"
|
|
|
|
CFLAGS+= -I${LIBARCHIVEDIR}/tar -I${LIBARCHIVEDIR}/libarchive
|
|
|
|
CFLAGS+= -I${LIBARCHIVEDIR}/libarchive_fe
|
2004-11-12 13:28:42 +00:00
|
|
|
SYMLINKS= bsdtar ${BINDIR}/tar
|
2004-04-19 22:09:04 +00:00
|
|
|
MLINKS= bsdtar.1 tar.1
|
2008-11-08 04:43:24 +00:00
|
|
|
DEBUG_FLAGS=-g
|
2004-04-19 22:09:04 +00:00
|
|
|
|
2011-12-22 08:42:07 +00:00
|
|
|
.PHONY: check test clean-test
|
2008-05-26 17:10:10 +00:00
|
|
|
check test: $(PROG) bsdtar.1.gz
|
2011-12-22 08:42:07 +00:00
|
|
|
cd ${.CURDIR}/test && make obj && make test
|
|
|
|
|
|
|
|
clean-test:
|
|
|
|
cd ${.CURDIR}/test && make clean
|
2008-01-02 00:27:14 +00:00
|
|
|
|
2004-08-07 03:24:49 +00:00
|
|
|
.include <bsd.prog.mk>
|