objdir build: Normalize COMPILE_ET_* commands
[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}/libafshcrypto_lwp.a \
24         ${TOP_LIBDIR}/liblwp.a \
25         ${TOP_LIBDIR}/util.a \
26         $(TOP_LIBDIR)/libopr.a \
27         ${TOP_LIBDIR}/libafscom_err.a \
28         $(LIB_roken) \
29         ${XLIBS}
30
31 OBJS_afsdump_scan    = afsdump_scan.o repair.o
32 OBJS_afsdump_xsed    = afsdump_xsed.o repair.o
33 OBJS_libxfiles.a     = xfiles.o xf_errs.o xf_printf.o int64.o \
34                        xf_files.o xf_rxcall.o xf_profile.o
35 OBJS_libdumpscan.a   = primitive.o util.o dumpscan_errs.o parsetag.o \
36                        parsedump.o parsevol.o parsevnode.o dump.o \
37                        directory.o pathname.o backuphdr.o stagehdr.o
38
39 TARGETS = libxfiles.a libdumpscan.a \
40           afsdump_scan afsdump_dirlist afsdump_extract dumptool
41
42 all: libxfiles.a libdumpscan.a \
43         afsdump_scan afsdump_dirlist afsdump_extract dumptool
44
45 generated: xf_errs.c xf_errs.h dumpscan_errs.c dumpscan_errs.h
46
47 afsdump_scan: libxfiles.a libdumpscan.a $(OBJS_afsdump_scan)
48         $(AFS_LDRULE) $(OBJS_afsdump_scan) $(LIBS)
49
50 afsdump_xsed: libxfiles.a libdumpscan.a $(OBJS_afsdump_xsed)
51         $(AFS_LDRULE) $(OBJS_afsdump_xsed) $(LIBS)
52
53 afsdump_dirlist: libxfiles.a libdumpscan.a afsdump_dirlist.o
54         $(AFS_LDRULE) afsdump_dirlist.o $(LIBS)
55
56 afsdump_extract: libxfiles.a libdumpscan.a afsdump_extract.o
57         $(AFS_LDRULE) afsdump_extract.o $(LIBS)
58
59 null-search: libxfiles.a libdumpscan.a null-search.c
60         $(AFS_LDRULE) null-search.c $(LIBS)
61
62 dumptool: ${srcdir}/dumptool.c
63         $(AFS_LDRULE) ${srcdir}/dumptool.c
64
65 libxfiles.a: $(OBJS_libxfiles.a)
66         -rm -f libxfiles.a
67         $(AR) r libxfiles.a $(OBJS_libxfiles.a)
68         $(RANLIB) libxfiles.a
69
70 libdumpscan.a: $(OBJS_libdumpscan.a)
71         -rm -f libdumpscan.a
72         $(AR) r libdumpscan.a $(OBJS_libdumpscan.a)
73         $(RANLIB) libdumpscan.a
74
75 xf_errs.c: ${srcdir}/xf_errs.et
76         $(COMPILE_ET_C) -p ${srcdir} xf_errs
77
78 xf_errs.h: ${srcdir}/xf_errs.et
79         $(COMPILE_ET_H) -p ${srcdir} xf_errs
80
81 afsdump_dirlist.o: xf_errs.h
82 afsdump_extract.o: xf_errs.h
83 afsdump_scan.o: xf_errs.h
84 directory.o: xf_errs.h
85 stagehdr.o: xf_errs.h
86 util.o: xf_errs.h
87 xf_files.o: xf_errs.h
88 xfiles.o: xf_errs.h
89 xf_printf.o: xf_errs.h
90 xf_profile.o: xf_errs.h
91 xf_rxcall.o: xf_errs.h
92
93 dumpscan_errs.h: ${srcdir}/dumpscan_errs.et
94         $(COMPILE_ET_H) -p ${srcdir} dumpscan_errs
95
96 dumpscan_errs.c: ${srcdir}/dumpscan_errs.et
97         $(COMPILE_ET_C) -p ${srcdir} dumpscan_errs
98
99 afsdump_dirlist.o: dumpscan_errs.h
100 afsdump_extract.o: dumpscan_errs.h
101 afsdump_scan.o: dumpscan_errs.h
102 backuphdr.o: dumpscan_errs.h
103 directory.o: dumpscan_errs.h
104 parsedump.o: dumpscan_errs.h
105 parsetag.o: dumpscan_errs.h
106 parsevnode.o: dumpscan_errs.h
107 parsevol.o: dumpscan_errs.h
108 pathname.o: dumpscan_errs.h
109 repair.o: dumpscan_errs.h
110 stagehdr.o: dumpscan_errs.h
111 util.o: dumpscan_errs.h
112
113 util.o xfiles.o xf_files.o: xf_errs.h
114 backuphdr.o directory.o parsedump.o parsetag.o: dumpscan_errs.h
115 parsevnode.o parsevol.o pathname.o stagehdr.o:  dumpscan_errs.h
116 util.o:                                         dumpscan_errs.h
117
118 # repair addresses the same storage as two different types of structs at the
119 # same time.
120 CFLAGS_repair.o = @CFLAGS_NOSTRICT@
121 repair.o: repair.c dumpscan_errs.h
122
123 ${TOP_LIBDIR}/libxfiles.a: libxfiles.a
124         ${INSTALL_DATA} $? $@
125
126 ${TOP_LIBDIR}/libdumpscan.a: libdumpscan.a
127         ${INSTALL_DATA} $? $@
128
129 dest:
130
131 install:
132
133 uninstall:
134
135 clean:
136         -rm -f xf_errs.c xf_errs.h dumpscan_errs.c dumpscan_errs.h *.o \
137         $(TARGETS)
138
139 include ../../config/Makefile.version
140
141 .PHONY:         all install clean realclean distclean mostlyclean install uninstall