voldump-builds-with-volser-20030827
[openafs.git] / src / volser / Makefile.in
1 # Copyright 2000, International Business Machines Corporation and others.
2 # All Rights Reserved.
3
4 # This software has been released under the terms of the IBM Public
5 # License.  For details, see the LICENSE file in the top-level source
6 # directory or online at http://www.openafs.org/dl/license10.html
7
8 srcdir=@srcdir@
9 include @TOP_OBJDIR@/src/config/Makefile.config
10 HELPER_SPLINT=@HELPER_SPLINT@
11
12
13 VINCLS=${TOP_INCDIR}/afs/partition.h ${TOP_INCDIR}/afs/volume.h \
14         ${TOP_INCDIR}/afs/vlserver.h vol.h dump.h volser.h  lockdata.h
15
16 RINCLS=${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \
17        ${TOP_INCDIR}/afs/keys.h ${TOP_INCDIR}/afs/cellconfig.h \
18         ${TOP_INCDIR}/ubik.h ${TOP_INCDIR}/afs/cmd.h
19
20 INTINCLS=volint.h volser.h 
21
22 LIBS=\
23         ${TOP_LIBDIR}/libaudit.a \
24         ${TOP_LIBDIR}/vlib.a \
25         ${TOP_LIBDIR}/libacl.a \
26         ${TOP_LIBDIR}/libsys.a \
27         ${TOP_LIBDIR}/libvldb.a \
28         ${TOP_LIBDIR}/libubik.a \
29         ${TOP_LIBDIR}/libauth.a \
30         ${TOP_LIBDIR}/libcmd.a \
31         ${TOP_LIBDIR}/librxkad.a \
32         ${TOP_LIBDIR}/libdes.a \
33         ${TOP_LIBDIR}/librxstat.a \
34         ${TOP_LIBDIR}/librx.a \
35         ${TOP_LIBDIR}/liblwp.a \
36         ${TOP_LIBDIR}/libsys.a \
37         ${TOP_LIBDIR}/libcom_err.a \
38         ${TOP_LIBDIR}/libkauth.a \
39         ${TOP_LIBDIR}/libusd.a \
40         ${TOP_LIBDIR}/util.a
41
42 VOLDUMP_LIBS = \
43         ../vol/ihandle.o \
44         ../vol/physio.o \
45         ../vol/vlib.a \
46         ${TOP_LIBDIR}/libcmd.a \
47         ${TOP_LIBDIR}/util.a \
48         ${TOP_LIBDIR}/libsys.a \
49         ${TOP_LIBDIR}/libdir.a \
50         ${TOP_LIBDIR}/liblwp.a  \
51         ${TOP_LIBDIR}/libacl.a
52
53 VSOBJS=vsprocs.o vsutils.o lockprocs.o volint.xdr.o volerr.o 
54 SOBJS=volmain.o volprocs.o physio.o common.o voltrans.o volerr.o \
55  volint.cs.o dumpstuff.o volint.ss.o volint.xdr.o
56
57 all: volserver vos restorevol voldump \
58         ${TOP_INCDIR}/afs/volser.h \
59         ${TOP_INCDIR}/afs/volint.h \
60         ${TOP_LIBDIR}/libvolser.a
61
62 restorevol: restorevol.c
63         ${CC} ${CFLAGS} -o restorevol ${srcdir}/restorevol.c \
64                 ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a
65
66 vos: vos.o ${VSOBJS} libvolser.a ${LIBS}
67         ${CC} ${LDFLAGS} -o vos vos.o $(VSOBJS) libvolser.a ${LIBS} ${XLIBS}
68
69 volserver: $(SOBJS) $(LIBS) ${TOP_LIBDIR}/libdir.a
70         ${CC} ${DBUG} -o volserver $(SOBJS) ${TOP_LIBDIR}/libdir.a \
71                 ${LDFLAGS} $(LIBS) ${XLIBS}
72
73 voldump: vol-dump.o ${VOLDUMP_LIBS}
74         ${CC} ${CFLAGS} -o voldump vol-dump.o ${VOLDUMP_LIBS} ${XLIBS}
75
76 libvolser.a: volint.cs.o  $(VSOBJS) volint.ss.o AFS_component_version_number.o
77         -$(RM) -f $@
78         $(AR) crv $@ volint.cs.o $(VSOBJS) volint.ss.o AFS_component_version_number.o 
79         $(RANLIB) $@
80
81 volser.h volerr.c: volerr.et volser.p.h
82         $(RM) -f volser.h volerr.c
83         ${COMPILE_ET} -p ${srcdir} volerr -h volser
84
85 volint.cs.c: volint.xg
86         ${RXGEN} -x -C -o $@ ${srcdir}/volint.xg
87
88 volint.ss.c: volint.xg
89         ${RXGEN} -x -S -o $@ ${srcdir}/volint.xg
90
91 volint.xdr.c: volint.xg
92         ${RXGEN} -x -c -o $@ ${srcdir}/volint.xg
93
94 volint.h: volint.xg
95         ${RXGEN} -x -h -o $@ ${srcdir}/volint.xg
96
97 volint.cs.c: volint.h
98 volint.ss.c: volint.h
99 volint.xdr.c: volint.h
100
101 #
102 # Dependencies
103 #
104 volint.cs.o: volint.cs.c ${INTINCLS}
105 volint.ss.o: volint.ss.c ${INTINCLS}
106 volint.xdr.o: volint.xdr.c ${INTINCLS}
107 vsutils.o: vsutils.c ${VINCLS} ${RINCLS} ${INTINCLS}
108 volmain.o: volmain.c ${VINCLS} ${RINCLS} AFS_component_version_number.c
109 volprocs.o: volprocs.c ${VINCLS} ${RINCLS} ${INTINCLS}
110 dumpstuff.o: dumpstuff.c ${VINCLS} ${RINCLS} ${INTINCLS}
111 voldump.o: voldump.c ${VINCLS} ${RINCLS}
112 vos.o: vos.c ${VINCLS} ${RINCLS} ${INTINCLS} AFS_component_version_number.c
113 vsprocs.o: vsprocs.c ${VINCLS} ${RINCLS} ${INTINCLS}
114 physio.o: physio.c ${VINCLS}
115 common.o: common.c ${VINCLS}
116 lockprocs.o: lockprocs.c ${VINCLS} ${INTINCLS} ${RINCLS}
117
118 #
119 # Installation targets
120 #
121 install: \
122         ${DESTDIR}${sbindir}/restorevol \
123         ${DESTDIR}${sbindir}/voldump \
124         ${DESTDIR}${includedir}/afs/volser.h \
125         ${DESTDIR}${includedir}/afs/volint.h \
126         ${DESTDIR}${sbindir}/vos \
127         ${DESTDIR}${afssrvsbindir}/vos \
128         ${DESTDIR}${afssrvlibexecdir}/volserver \
129         ${DESTDIR}${libdir}/afs/libvolser.a
130
131
132 ${DEST}/include/afs/volser.h: volser.h
133         ${INSTALL} $? $@
134
135 ${DEST}/include/afs/volint.h: volint.h
136         ${INSTALL} $? $@
137
138 ${DEST}/etc/restorevol: restorevol
139         ${INSTALL} $? $@
140
141 ${DEST}/etc/voldump: voldump
142         ${INSTALL} $? $@
143
144 ${DEST}/etc/vos ${DEST}/root.server/usr/afs/bin/vos: vos
145         ${INSTALL} $? $@
146
147 ${DEST}/lib/afs/libvolser.a: libvolser.a
148         ${INSTALL} $? $@
149
150 ${DEST}/root.server/usr/afs/bin/volserver: volserver
151         ${INSTALL} $? $@
152
153 #
154 # Misc targets
155
156 clean:
157         $(RM) -f *.o *.a core volserver volint.ss.c volint.cs.c volint.h \
158         volint.xdr.c vos volser.h volerr.c AFS_component_version_number.c restorevol voldump
159
160 include ../config/Makefile.version
161
162 ${DESTDIR}${sbindir}/restorevol: restorevol
163         ${INSTALL} $? $@
164
165 ${DESTDIR}${sbindir}/voldump: voldump
166         ${INSTALL} $? $@
167
168 ${DESTDIR}${includedir}/afs/volser.h: volser.h
169         ${INSTALL} $? $@
170
171 ${TOP_INCDIR}/afs/volser.h: volser.h
172         ${INSTALL} $? $@
173
174 ${DESTDIR}${includedir}/afs/volint.h: volint.h
175         ${INSTALL} $? $@
176
177 ${TOP_INCDIR}/afs/volint.h: volint.h
178         ${INSTALL} $? $@
179
180 ${DESTDIR}${sbindir}/vos: vos
181         ${INSTALL} $? $@
182
183 ${DESTDIR}${afssrvsbindir}/vos: vos
184         ${INSTALL} $? $@
185
186 ${DESTDIR}${afssrvlibexecdir}/volserver: volserver
187         ${INSTALL} $? $@
188
189 ${DESTDIR}${libdir}/afs/libvolser.a: libvolser.a
190         ${INSTALL} $? $@
191
192 ${TOP_LIBDIR}/libvolser.a: libvolser.a
193         ${INSTALL} $? $@
194
195 dest: \
196         ${DEST}/etc/restorevol \
197         ${DEST}/etc/voldump \
198         ${DEST}/include/afs/volser.h \
199         ${DEST}/include/afs/volint.h \
200         ${DEST}/etc/vos \
201         ${DEST}/root.server/usr/afs/bin/vos \
202         ${DEST}/root.server/usr/afs/bin/volserver \
203         ${DEST}/lib/afs/libvolser.a
204
205
206 check-splint::
207         sh $(HELPER_SPLINT) $(CFLAGS) \
208             vos.c restorevol.c \
209             vsprocs.c vsutils.c lockprocs.c volerr.c \
210             volmain.c volprocs.c physio.c common.c voltrans.c \
211             dumpstuff.c