]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/tar/test/Makefile
Merge new version of libcxxrt. This brings in three fixes:
[FreeBSD/FreeBSD.git] / usr.bin / tar / test / Makefile
1 # $FreeBSD$
2
3 LIBARCHIVEDIR=  ${.CURDIR}/../../../contrib/libarchive
4
5 .PATH: ${LIBARCHIVEDIR}/tar/test
6 TESTS=  \
7         test_0.c                                \
8         test_basic.c                            \
9         test_copy.c                             \
10         test_empty_mtree.c                      \
11         test_format_newc.c                      \
12         test_help.c                             \
13         test_option_C_upper.c                   \
14         test_option_H_upper.c                   \
15         test_option_L_upper.c                   \
16         test_option_O_upper.c                   \
17         test_option_T_upper.c                   \
18         test_option_U_upper.c                   \
19         test_option_X_upper.c                   \
20         test_option_b.c                         \
21         test_option_exclude.c                   \
22         test_option_gid_gname.c                 \
23         test_option_k.c                         \
24         test_option_keep_newer_files.c          \
25         test_option_n.c                         \
26         test_option_nodump.c                    \
27         test_option_newer_than.c                \
28         test_option_q.c                         \
29         test_option_r.c                         \
30         test_option_s.c                         \
31         test_option_uid_uname.c                 \
32         test_patterns.c                         \
33         test_print_longpath.c                   \
34         test_stdio.c                            \
35         test_strip_components.c                 \
36         test_symlink_dir.c                      \
37         test_version.c
38
39 # Build the test program
40 SRCS=   ${TAR_SRCS}                             \
41         ${TESTS}                                \
42         list.h                                  \
43         main.c
44
45 CLEANFILES+= list.h
46
47 NO_MAN=yes
48
49 PROG=bsdtar_test
50 DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA}
51 CFLAGS+=        -DPLATFORM_CONFIG_H=\"${.CURDIR}/../../../lib/libarchive/config_freebsd.h\"
52 LDADD= -larchive -lz -lbz2 -llzma
53 CFLAGS+= -static -g -O2 -Wall
54 CFLAGS+= -I${.CURDIR}/../../../lib/libarchive -I${.OBJDIR}
55 CFLAGS+= -I${LIBARCHIVEDIR}/tar
56
57 # Uncomment to link against dmalloc
58 #LDADD+= -L/usr/local/lib -ldmalloc
59 #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
60
61 check test:     bsdtar_test
62         ./bsdtar_test -p ${.OBJDIR}/../bsdtar -r ${LIBARCHIVEDIR}/tar/test
63
64 list.h: ${TESTS} Makefile
65         (cd ${LIBARCHIVEDIR}/tar/test; cat ${TESTS}) | \
66         grep DEFINE_TEST > ${.OBJDIR}/list.h
67
68 clean:
69         rm -f ${CLEANFILES}
70         rm -f *.out
71         rm -f *.o
72         rm -f *.core
73         rm -f *~
74         rm -f list.h
75         rm -f archive.h ../archive.h
76         -chmod -R +w /tmp/bsdtar_test.*
77         rm -rf /tmp/bsdtar_test.*
78
79 .include <bsd.prog.mk>