tools: move useful tools from test dir to tools dir
[openafs.git] / src / tools / Makefile.in
1 srcdir          = @srcdir@
2 include @TOP_OBJDIR@/src/config/Makefile.config
3 include @TOP_OBJDIR@/src/config/Makefile.lwp
4
5
6 SHELL           = /bin/sh
7
8 INCDIRS=-I${TOP_OBJDIR}/src/config -I${TOP_INCDIR}/afs -I${TOP_INCDIR}
9 INCLIBS=-L${SRCDIR}/lib/afs -L${TOP_LIBDIR}
10
11 LIBS=\
12         libdumpscan.a \
13         libxfiles.a \
14         ${TOP_LIBDIR}/libauth.a \
15         ${TOP_LIBDIR}/libaudit.a \
16         ${TOP_LIBDIR}/libvolser.a \
17         ${TOP_LIBDIR}/libvldb.a \
18         ${TOP_LIBDIR}/libubik.a \
19         ${TOP_LIBDIR}/librxkad.a \
20         ${TOP_LIBDIR}/libsys.a \
21         ${TOP_LIBDIR}/librx.a \
22         ${TOP_LIBDIR}/liblwp.a \
23         ${TOP_LIBDIR}/util.a \
24         $(TOP_LIBDIR)/libopr.a \
25         ${TOP_LIBDIR}/libafscom_err.a \
26         $(LIB_roken) \
27         ${XLIBS}
28
29 OBJS_afsdump_scan    = afsdump_scan.o repair.o
30 OBJS_afsdump_xsed    = afsdump_xsed.o repair.o
31 OBJS_libxfiles.a     = xfiles.o xf_errs.o xf_printf.o int64.o \
32                        xf_files.o xf_rxcall.o xf_profile.o
33 OBJS_libdumpscan.a   = primitive.o util.o dumpscan_errs.o parsetag.o \
34                        parsedump.o parsevol.o parsevnode.o dump.o \
35                        directory.o pathname.o backuphdr.o stagehdr.o
36
37 TARGETS = libxfiles.a libdumpscan.a \
38           afsdump_scan afsdump_dirlist afsdump_extract dumptool
39
40 all: libxfiles.a libdumpscan.a \
41         afsdump_scan afsdump_dirlist afsdump_extract dumptool
42
43 generated: xf_errs.c xf_errs.h dumpscan_errs.c dumpscan_errs.h
44
45 afsdump_scan: libxfiles.a libdumpscan.a $(OBJS_afsdump_scan)
46         $(AFS_LDRULE) $(OBJS_afsdump_scan) $(LIBS)
47
48 afsdump_xsed: libxfiles.a libdumpscan.a $(OBJS_afsdump_xsed)
49         $(AFS_LDRULE) $(OBJS_afsdump_xsed) $(LIBS)
50
51 afsdump_dirlist: libxfiles.a libdumpscan.a afsdump_dirlist.o
52         $(AFS_LDRULE) afsdump_dirlist.o $(LIBS)
53
54 afsdump_extract: libxfiles.a libdumpscan.a afsdump_extract.o
55         $(AFS_LDRULE) afsdump_extract.o $(LIBS)
56
57 null-search: libxfiles.a libdumpscan.a null-search.c
58         $(AFS_LDRULE) null-search.c $(LIBS)
59
60 dumptool: dumptool.c
61         $(AFS_LDRULE) dumptool.c
62
63 libxfiles.a: $(OBJS_libxfiles.a)
64         -rm -f libxfiles.a
65         $(AR) r libxfiles.a $(OBJS_libxfiles.a)
66         $(RANLIB) libxfiles.a
67
68 libdumpscan.a: $(OBJS_libdumpscan.a)
69         -rm -f libdumpscan.a
70         $(AR) r libdumpscan.a $(OBJS_libdumpscan.a)
71         $(RANLIB) libdumpscan.a
72
73 xf_errs.c xf_errs.h: xf_errs.et
74         $(COMPILE_ET) xf_errs.et
75
76 dumpscan_errs.c dumpscan_errs.h: dumpscan_errs.et
77         $(COMPILE_ET) dumpscan_errs.et
78
79 util.o xfiles.o xf_files.o: xf_errs.h
80 backuphdr.o directory.o parsedump.o parsetag.o: dumpscan_errs.h
81 parsevnode.o parsevol.o pathname.o stagehdr.o:  dumpscan_errs.h
82 util.o:                                         dumpscan_errs.h
83
84 # repair addresses the same storage as two different types of structs at the
85 # same time.
86 CFLAGS_repair.o = @CFLAGS_NOSTRICT@
87 repair.o: repair.c dumpscan_errs.h
88
89 ${TOP_LIBDIR}/libxfiles.a: libxfiles.a
90         ${INSTALL_DATA} $? $@
91
92 ${TOP_LIBDIR}/libdumpscan.a: libdumpscan.a
93         ${INSTALL_DATA} $? $@
94
95 dest:
96
97 install:
98
99 uninstall:
100
101 clean:
102         -rm -f xf_errs.c xf_errs.h dumpscan_errs.c dumpscan_errs.h *.o \
103         $(TARGETS)
104
105 include ../config/Makefile.version
106
107 .PHONY:         all install clean realclean distclean mostlyclean install uninstall