3 LIBARCHIVEDIR= ${.CURDIR}/../../../contrib/libarchive
5 .PATH: ${LIBARCHIVEDIR}/tar
6 # Some tar sources are pulled in for white-box tests
10 .PATH: ${LIBARCHIVEDIR}/tar/test
18 test_option_T_upper.c \
24 test_strip_components.c \
28 # Build the test program
39 DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA}
40 CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/../config_freebsd.h\"
41 LDADD= -larchive -lz -lbz2 -llzma
42 CFLAGS+= -static -g -O2 -Wall
43 CFLAGS+= -I${.CURDIR}/.. -I${.OBJDIR}
44 CFLAGS+= -I${LIBARCHIVEDIR}/tar
46 # Uncomment to link against dmalloc
47 #LDADD+= -L/usr/local/lib -ldmalloc
48 #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
50 check test: bsdtar_test
51 ./bsdtar_test -p ${.OBJDIR}/../bsdtar -r ${LIBARCHIVEDIR}/tar/test
53 list.h: ${TESTS} Makefile
54 (cd ${LIBARCHIVEDIR}/tar/test; cat ${TESTS}) | \
55 grep DEFINE_TEST > ${.OBJDIR}/list.h
64 rm -f archive.h ../archive.h
65 -chmod -R +w /tmp/bsdtar_test.*
66 rm -rf /tmp/bsdtar_test.*
68 .include <bsd.prog.mk>