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