3 # Where to find the cpio sources (for the internal unit tests)
4 CPIO_SRCDIR=${.CURDIR}/..
9 .PATH: ${.CURDIR}/../../../lib/libarchive/libarchive_fe
10 CPIO_SRCS+= err.c pathmatch.c
17 test_option_B_upper.c \
18 test_option_C_upper.c \
19 test_option_J_upper.c \
20 test_option_L_upper.c \
21 test_option_Z_upper.c \
32 test_option_version.c \
36 test_passthrough_dotdot.c \
37 test_passthrough_reverse.c \
40 # Build the test program
46 CLEANFILES+= list.h bsdcpio_test
51 DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA}
52 CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
54 LDADD= -larchive -lz -lbz2 -llzma
55 #CFLAGS+= -static -g -O2 -Wall
58 CFLAGS+= -I${CPIO_SRCDIR}
59 CFLAGS+= -I${.CURDIR}/../../../lib/libarchive/libarchive_fe
61 # Uncomment to link against dmalloc
62 #LDADD+= -L/usr/local/lib -ldmalloc
63 #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
65 check test: bsdcpio_test
66 ${.OBJDIR}/bsdcpio_test -p ${.OBJDIR}/../bsdcpio -r ${.CURDIR}
68 ${.OBJDIR}/list.h list.h: ${TESTS} Makefile
69 (cd ${.CURDIR}; cat ${TESTS}) | grep DEFINE_TEST > list.h
74 -chmod -R +w /tmp/bsdcpio_test.*
75 rm -rf /tmp/bsdcpio_test.*
77 .include <bsd.prog.mk>