Makefile revision 178715
1# $FreeBSD: head/usr.bin/tar/test/Makefile 178715 2008-05-02 05:17:16Z kientzle $ 2 3# Where to find the tar sources (for the internal unit tests) 4TAR_SRCDIR=${.CURDIR}/.. 5.PATH: ${TAR_SRCDIR} 6 7# Some tar sources are pulled in for white-box tests 8TAR_SRCS= \ 9 ../getdate.y 10 11TESTS= \ 12 test_0.c \ 13 test_basic.c \ 14 test_copy.c \ 15 test_getdate.c \ 16 test_help.c \ 17 test_option_T.c \ 18 test_stdio.c \ 19 test_version.c 20 21# Build the test program 22SRCS= ${TAR_SRCS} \ 23 ${TESTS} \ 24 list.h \ 25 main.c 26 27CLEANFILES+= list.h 28 29NO_MAN=yes 30 31PROG=bsdtar_test 32DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} 33CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" 34CFLAGS+= -I.. 35LDADD= -larchive -lz -lbz2 36CFLAGS+= -static -g -O2 -Wall 37CFLAGS+= -I${.OBJDIR} 38CFLAGS+= -I${TAR_SRCDIR} 39 40# Uncomment to link against dmalloc 41#LDADD+= -L/usr/local/lib -ldmalloc 42#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC 43WARNS=6 44 45check test: bsdtar_test 46 ./bsdtar_test -p ${.OBJDIR}/../bsdtar -r ${.CURDIR} 47 48list.h: ${TESTS} Makefile 49 (cd ${.CURDIR}; cat ${TESTS}) | grep DEFINE_TEST > list.h 50 51clean: 52 rm -f *.out 53 rm -f *.o 54 rm -f *.core 55 rm -f *~ 56 rm -f list.h 57 rm -f archive.h ../archive.h 58 -chmod -R +w /tmp/bsdtar_test.* 59 rm -rf /tmp/bsdtar_test.* 60 61.include <bsd.prog.mk> 62