3 # Where to find the cpio sources (for the internal unit tests)
4 CPIO_SRCDIR=${.CURDIR}/..
7 # Some cpio sources are pulled in for white-box tests
8 CPIO_SRCS= cmdline.c err.c pathmatch.c
26 test_option_version.c \
30 test_passthrough_dotdot.c \
31 test_passthrough_reverse.c \
34 # Build the test program
40 CLEANFILES+= list.h bsdcpio_test
45 DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ}
46 CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
48 LDADD= -larchive -lz -lbz2
49 CFLAGS+= -static -g -O2 -Wall
51 CFLAGS+= -I${CPIO_SRCDIR}
53 # Uncomment to link against dmalloc
54 #LDADD+= -L/usr/local/lib -ldmalloc
55 #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
58 check test: bsdcpio_test
59 ${.OBJDIR}/bsdcpio_test -p ${.OBJDIR}/../bsdcpio -r ${.CURDIR}
61 ${.OBJDIR}/list.h list.h: ${TESTS} Makefile
62 (cd ${.CURDIR}; cat ${TESTS}) | grep DEFINE_TEST > list.h
67 -chmod -R +w /tmp/bsdcpio_test.*
68 rm -rf /tmp/bsdcpio_test.*
70 .include <bsd.prog.mk>