Makefile revision 207849
1179323Skientzle# $FreeBSD: head/usr.bin/cpio/test/Makefile 207849 2010-05-10 15:28:44Z mm $ 2179323Skientzle 3179323Skientzle# Where to find the cpio sources (for the internal unit tests) 4179323SkientzleCPIO_SRCDIR=${.CURDIR}/.. 5179323Skientzle.PATH: ${CPIO_SRCDIR} 6179323Skientzle 7179323Skientzle# Some cpio sources are pulled in for white-box tests 8179323SkientzleCPIO_SRCS= cmdline.c err.c pathmatch.c 9179323Skientzle 10179323SkientzleTESTS= \ 11179323Skientzle test_0.c \ 12179323Skientzle test_basic.c \ 13179323Skientzle test_format_newc.c \ 14179323Skientzle test_gcpio_compat.c \ 15179323Skientzle test_option_a.c \ 16179323Skientzle test_option_B.c \ 17179323Skientzle test_option_c.c \ 18179323Skientzle test_option_d.c \ 19179323Skientzle test_option_f.c \ 20179323Skientzle test_option_help.c \ 21179323Skientzle test_option_L.c \ 22179323Skientzle test_option_ell.c \ 23179323Skientzle test_option_m.c \ 24179323Skientzle test_option_t.c \ 25179323Skientzle test_option_u.c \ 26179323Skientzle test_option_version.c \ 27179323Skientzle test_option_y.c \ 28179323Skientzle test_option_z.c \ 29179323Skientzle test_owner_parse.c \ 30182094Skientzle test_passthrough_dotdot.c \ 31182092Skientzle test_passthrough_reverse.c \ 32182092Skientzle test_pathmatch.c 33179323Skientzle 34179323Skientzle# Build the test program 35179323SkientzleSRCS= list.h \ 36179323Skientzle ${CPIO_SRCS} \ 37179323Skientzle ${TESTS} \ 38179323Skientzle main.c 39179323Skientzle 40182100SkientzleCLEANFILES+= list.h bsdcpio_test 41179323Skientzle 42179323SkientzleNO_MAN=yes 43179323Skientzle 44179323SkientzlePROG=bsdcpio_test 45207849SmmDPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA} 46179323SkientzleCFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" 47179323SkientzleCFLAGS+= -I.. 48207849SmmLDADD= -larchive -lz -lbz2 -llzma 49179323SkientzleCFLAGS+= -static -g -O2 -Wall 50179323SkientzleCFLAGS+= -I${.OBJDIR} 51179323SkientzleCFLAGS+= -I${CPIO_SRCDIR} 52179323Skientzle 53179323Skientzle# Uncomment to link against dmalloc 54179323Skientzle#LDADD+= -L/usr/local/lib -ldmalloc 55179323Skientzle#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC 56179323Skientzle 57179323Skientzlecheck test: bsdcpio_test 58179323Skientzle ${.OBJDIR}/bsdcpio_test -p ${.OBJDIR}/../bsdcpio -r ${.CURDIR} 59179323Skientzle 60179323Skientzle${.OBJDIR}/list.h list.h: ${TESTS} Makefile 61179323Skientzle (cd ${.CURDIR}; cat ${TESTS}) | grep DEFINE_TEST > list.h 62179323Skientzle 63179323Skientzleclean: 64182100Skientzle rm -f ${CLEANFILES} 65179323Skientzle rm -f *~ 66179323Skientzle -chmod -R +w /tmp/bsdcpio_test.* 67179323Skientzle rm -rf /tmp/bsdcpio_test.* 68179323Skientzle 69179323Skientzle.include <bsd.prog.mk> 70