]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - usr.bin/cpio/test/Makefile
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / usr.bin / cpio / test / Makefile
1 # $FreeBSD$
2
3 LIBARCHIVEDIR=  ${.CURDIR}/../../../contrib/libarchive
4
5 .PATH:  ${LIBARCHIVEDIR}/cpio
6 CPIO_SRCS= cmdline.c
7
8 .PATH:  ${LIBARCHIVEDIR}/libarchive_fe
9 CPIO_SRCS+= err.c pathmatch.c
10
11 .PATH:  ${LIBARCHIVEDIR}/cpio/test
12 TESTS=  \
13         test_0.c                                \
14         test_basic.c                            \
15         test_format_newc.c                      \
16         test_gcpio_compat.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                   \
22         test_option_a.c                         \
23         test_option_c.c                         \
24         test_option_d.c                         \
25         test_option_f.c                         \
26         test_option_help.c                      \
27         test_option_l.c                         \
28         test_option_lzma.c                      \
29         test_option_m.c                         \
30         test_option_t.c                         \
31         test_option_u.c                         \
32         test_option_version.c                   \
33         test_option_y.c                         \
34         test_option_z.c                         \
35         test_owner_parse.c                      \
36         test_passthrough_dotdot.c               \
37         test_passthrough_reverse.c              \
38         test_pathmatch.c
39
40 # Build the test program
41 SRCS= list.h                                    \
42         ${CPIO_SRCS}                            \
43         ${TESTS}                                \
44         main.c
45
46 CLEANFILES+= list.h bsdcpio_test
47
48 NO_MAN=yes
49
50 PROG=bsdcpio_test
51 DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA}
52 CFLAGS+=        -DPLATFORM_CONFIG_H=\"${.CURDIR}/../config_freebsd.h\"
53 CFLAGS+=        -I${.CURDIR}/..
54 LDADD= -larchive -lz -lbz2 -llzma
55 #CFLAGS+= -static -g -O2 -Wall
56 CFLAGS+= -g -O2 -Wall
57 CFLAGS+= -I${.OBJDIR}
58 CFLAGS+= -I${LIBARCHIVEDIR}/cpio -I${LIBARCHIVEDIR}/libarchive_fe
59
60 # Uncomment to link against dmalloc
61 #LDADD+= -L/usr/local/lib -ldmalloc
62 #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
63
64 check test:     bsdcpio_test
65         ${.OBJDIR}/bsdcpio_test -p ${.OBJDIR}/../bsdcpio \
66         -r ${LIBARCHIVEDIR}/cpio/test
67
68 ${.OBJDIR}/list.h list.h: ${TESTS} Makefile
69         (cd ${LIBARCHIVEDIR}/cpio/test; cat ${TESTS}) | \
70         grep DEFINE_TEST > ${.OBJDIR}/list.h
71
72 clean:
73         rm -f ${CLEANFILES}
74         rm -f *~
75         -chmod -R +w /tmp/bsdcpio_test.*
76         rm -rf /tmp/bsdcpio_test
77
78 .include <bsd.prog.mk>