b263b523c298549e775e2380256603adda15ae77
[openafs.git] / src / util / 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
11 objects = assert.o base64.o casestrcpy.o ktime.o volparse.o hostparse.o \
12          hputil.o kreltime.o isathing.o get_krbrlm.o uuid.o serverLog.o \
13          dirpath.o fileutil.o netutils.o flipbase64.o \
14          afs_atomlist.o afs_lhash.o snprintf.o ${REGEX_OBJ}
15
16 includes = \
17         ${TOP_INCDIR}/afs/dirpath.h \
18         ${TOP_INCDIR}/afs/pthread_nosigs.h \
19         ${TOP_INCDIR}/afs/assert.h \
20         ${TOP_INCDIR}/afs/errors.h \
21         ${TOP_INCDIR}/afs/vice.h \
22         ${TOP_INCDIR}/afs/remote.h \
23         ${TOP_INCDIR}/afs/ktime.h \
24         ${TOP_INCDIR}/afs/fileutil.h \
25         ${TOP_INCDIR}/afs/netutils.h \
26         ${TOP_INCDIR}/afs/packages.h \
27         ${TOP_INCDIR}/afs/afsutil.h \
28         ${TOP_INCDIR}/afs/afsutil_prototypes.h \
29         ${TOP_INCDIR}/afs/pthread_glock.h \
30         ${TOP_INCDIR}/afs/afs_atomlist.h \
31         ${TOP_INCDIR}/afs/afs_lhash.h \
32         ${TOP_INCDIR}/potpourri.h 
33
34 all: ${includes} \
35         ${TOP_LIBDIR}/util.a \
36         ${TOP_LIBDIR}/libafsutil.a \
37         sys
38
39 depinstall: ${includes}
40
41 dirpath.h: ${srcdir}/dirpath.hin Makefile
42         ( sed \
43                 -e "s+@afsconfdir+${afsconfdir}+" \
44                 -e "s+@viceetcdir+${viceetcdir}+" \
45                 -e "s+@afssrvbindir+${afssrvbindir}+" \
46                 -e "s+@afssrvsbindir+${afssrvsbindir}+" \
47                 -e "s+@afssrvlibexecdir+${afssrvlibexecdir}+" \
48                 -e "s+@afsdbdir+${afsdbdir}+" \
49                 -e "s+@afslogsdir+${afslogsdir}+" \
50                 -e "s+@afslocaldir+${afslocaldir}+" \
51                 -e "s+@afsbackupdir+${afsbackupdir}+" \
52                 -e "s+@afsbosconfigdir+${afsbosconfigdir}+" \
53                 ${srcdir}/dirpath.hin >dirpath.h.tmp && \
54                 mv dirpath.h.tmp dirpath.h )
55
56 util.a: ${objects} AFS_component_version_number.o
57         $(RM) -f util.a
58         $(AR) crv util.a ${objects} AFS_component_version_number.o
59         $(RANLIB) util.a
60
61 assert.o: ${srcdir}/assert.c ${includes}
62         ${CC} ${CFLAGS} -c ${srcdir}/assert.c
63
64 casestrcpy.o: ${srcdir}/casestrcpy.c ${includes}
65         ${CC} ${CFLAGS} -c ${srcdir}/casestrcpy.c
66
67 hputil.o: ${srcdir}/hputil.c ${includes}
68         ${CC} ${CFLAGS} -c ${srcdir}/hputil.c
69
70 flipbase64.o: ${srcdir}/flipbase64.c ${includes}
71         ${CC} ${CFLAGS} -c ${srcdir}/flipbase64.c
72
73 volparse.o: ${srcdir}/volparse.c ${includes}
74         ${CC} ${CFLAGS} -c ${srcdir}/volparse.c
75
76 snprintf.o: ${srcdir}/snprintf.c ${includes}
77         ${CC} ${CFLAGS} -c ${srcdir}/snprintf.c
78
79 base64.o: ${srcdir}/base64.c ${includes}
80         ${CC} ${CFLAGS} -c ${srcdir}/base64.c
81
82 hostparse.o: ${srcdir}/hostparse.c ${includes}
83         ${CC} ${CFLAGS} -c ${srcdir}/hostparse.c
84
85 ktime.o: ${srcdir}/ktime.c ${includes}
86         ${CC} ${CFLAGS} -c ${srcdir}/ktime.c
87
88 kreltime.o: ${srcdir}/kreltime.c ${includes}
89         ${CC} ${CFLAGS} -c ${srcdir}/kreltime.c
90
91 get_krbrlm.o: ${srcdir}/get_krbrlm.c ${includes}
92         ${CC} ${CFLAGS} -c ${srcdir}/get_krbrlm.c
93
94 uuid.o: ${srcdir}/uuid.c ${includes}
95         ${CC} ${CFLAGS} -c ${srcdir}/uuid.c
96
97 sys.o: ${srcdir}/sys.c AFS_component_version_number.c ${includes}
98         ${CC} ${CFLAGS} -c ${srcdir}/sys.c
99
100 sys: sys.o 
101         ${CC} ${LDFLAGS} -o sys sys.o
102
103 isathing.o: ${srcdir}/isathing.c ${includes}
104         ${CC} ${CFLAGS} -c ${srcdir}/isathing.c
105
106 serverLog.o: ${srcdir}/serverLog.c ${includes}
107         ${CC} ${CFLAGS} -c ${srcdir}/serverLog.c
108
109 dirpath.o: ${srcdir}/dirpath.c ${includes}
110         ${CC} ${CFLAGS} -c ${srcdir}/dirpath.c
111
112 fileutil.o: ${srcdir}/fileutil.c ${includes}
113         ${CC} ${CFLAGS} -c ${srcdir}/fileutil.c
114
115 netutils.o: ${srcdir}/netutils.c ${includes}
116         ${CC} ${CFLAGS} -c ${srcdir}/netutils.c
117
118 afs_atomlist.o: ${srcdir}/afs_atomlist.c ${includes}
119         ${CC} ${CFLAGS} -c ${srcdir}/afs_atomlist.c
120
121 afs_lhash.o: ${srcdir}/afs_lhash.c ${includes}
122         ${CC} ${CFLAGS} -c ${srcdir}/afs_lhash.c
123
124 #
125 # Install targets
126 #
127 KDIR=../libafs/afs
128 UKDIR=../libuafs/afs
129
130 install: \
131         ${DESTDIR}${includedir}/afs/dirpath.h \
132         ${DESTDIR}${includedir}/afs/pthread_nosigs.h \
133         ${DESTDIR}${includedir}/afs/assert.h \
134         ${DESTDIR}${includedir}/afs/errors.h \
135         ${DESTDIR}${includedir}/afs/vice.h \
136         ${DESTDIR}${includedir}/afs/remote.h \
137         ${DESTDIR}${includedir}/afs/ktime.h \
138         ${DESTDIR}${includedir}/afs/fileutil.h \
139         ${DESTDIR}${includedir}/afs/netutils.h \
140         ${DESTDIR}${includedir}/afs/packages.h \
141         ${DESTDIR}${includedir}/afs/afsutil.h \
142         ${DESTDIR}${includedir}/afs/afsutil_prototypes.h \
143         ${DESTDIR}${includedir}/afs/pthread_glock.h \
144         ${DESTDIR}${includedir}/afs/afs_atomlist.h \
145         ${DESTDIR}${includedir}/afs/afs_lhash.h \
146         ${DESTDIR}${includedir}/potpourri.h \
147         ${DESTDIR}${libdir}/afs/util.a \
148         ${DESTDIR}${libdir}/afs/libafsutil.a \
149         ${DESTDIR}${bindir}/sys
150
151 ${TOP_INCDIR}/afs/dirpath.h: dirpath.h
152         ${INSTALL} $? $@
153
154 ${TOP_INCDIR}/afs/pthread_nosigs.h: ${srcdir}/pthread_nosigs.h
155         ${INSTALL} $? $@
156
157 ${TOP_INCDIR}/afs/assert.h: ${srcdir}/assert.h
158         ${INSTALL} $? $@
159
160 ${TOP_INCDIR}/afs/errors.h: ${srcdir}/errors.h
161         ${INSTALL} $? $@
162
163 ${TOP_INCDIR}/afs/vice.h: ${srcdir}/vice.h
164         ${INSTALL} $? $@
165
166 ${TOP_INCDIR}/afs/remote.h: ${srcdir}/remote.h
167         ${INSTALL} $? $@
168
169 ${TOP_INCDIR}/afs/ktime.h: ${srcdir}/ktime.h
170         ${INSTALL} $? $@
171
172 ${TOP_INCDIR}/afs/fileutil.h: ${srcdir}/fileutil.h
173         ${INSTALL} $? $@
174
175 ${TOP_INCDIR}/afs/netutils.h: ${srcdir}/netutils.h
176         ${INSTALL} $? $@
177
178 ${TOP_INCDIR}/afs/packages.h: ${srcdir}/packages.h
179         ${INSTALL} $? $@
180
181 ${TOP_INCDIR}/afs/afsutil.h: ${srcdir}/afsutil.h
182         ${INSTALL} $? $@
183
184 ${TOP_INCDIR}/afs/afsutil_prototypes.h: ${srcdir}/afsutil_prototypes.h
185         ${INSTALL} $? $@
186
187 ${TOP_INCDIR}/afs/pthread_glock.h: ${srcdir}/pthread_glock.h
188         ${INSTALL} $? $@
189
190 ${TOP_INCDIR}/afs/afs_atomlist.h: ${srcdir}/afs_atomlist.h
191         ${INSTALL} $? $@
192
193 ${TOP_INCDIR}/afs/afs_lhash.h: ${srcdir}/afs_lhash.h
194         ${INSTALL} $? $@
195
196 ${TOP_INCDIR}/potpourri.h: ${srcdir}/potpourri.h
197         ${INSTALL} $? $@
198
199
200 ${TOP_LIBDIR}/util.a: util.a
201         ${INSTALL} $? $@
202
203 ${TOP_LIBDIR}/libafsutil.a: util.a
204         ${INSTALL} $? $@
205
206
207 ${DESTDIR}${includedir}/afs/dirpath.h: dirpath.h
208         ${INSTALL} $? $@
209
210 ${DESTDIR}${includedir}/afs/pthread_nosigs.h: ${srcdir}/pthread_nosigs.h
211         ${INSTALL} $? $@
212
213 ${DESTDIR}${includedir}/afs/assert.h: ${srcdir}/assert.h
214         ${INSTALL} $? $@
215
216 ${DESTDIR}${includedir}/afs/errors.h: ${srcdir}/errors.h
217         ${INSTALL} $? $@
218
219 ${DESTDIR}${includedir}/afs/vice.h: ${srcdir}/vice.h
220         ${INSTALL} $? $@
221
222 ${DESTDIR}${includedir}/afs/remote.h: ${srcdir}/remote.h
223         ${INSTALL} $? $@
224
225 ${DESTDIR}${includedir}/afs/ktime.h: ${srcdir}/ktime.h
226         ${INSTALL} $? $@
227
228 ${DESTDIR}${includedir}/afs/fileutil.h: ${srcdir}/fileutil.h
229         ${INSTALL} $? $@
230
231 ${DESTDIR}${includedir}/afs/netutils.h: ${srcdir}/netutils.h
232         ${INSTALL} $? $@
233
234 ${DESTDIR}${includedir}/afs/packages.h: ${srcdir}/packages.h
235         ${INSTALL} $? $@
236
237 ${DESTDIR}${includedir}/afs/afsutil.h: ${srcdir}/afsutil.h
238         ${INSTALL} $? $@
239
240 ${DESTDIR}${includedir}/afs/afsutil_prototypes.h: ${srcdir}/afsutil_prototypes.h
241         ${INSTALL} $? $@
242
243 ${DESTDIR}${includedir}/afs/pthread_glock.h: ${srcdir}/pthread_glock.h
244         ${INSTALL} $? $@
245
246 ${DESTDIR}${includedir}/afs/afs_atomlist.h: ${srcdir}/afs_atomlist.h
247         ${INSTALL} $? $@
248
249 ${DESTDIR}${includedir}/afs/afs_lhash.h: ${srcdir}/afs_lhash.h
250         ${INSTALL} $? $@
251
252 ${DESTDIR}${includedir}/potpourri.h: ${srcdir}/potpourri.h
253         ${INSTALL} $? $@
254
255
256 ${DESTDIR}${libdir}/afs/util.a: util.a
257         ${INSTALL} $? $@
258
259 ${DESTDIR}${libdir}/afs/libafsutil.a: util.a
260         ${INSTALL} $? $@
261
262
263 ${DESTDIR}${bindir}/sys: sys
264         ${INSTALL} $? $@
265
266
267 ${DEST}/include/afs/dirpath.h: dirpath.h
268         ${INSTALL} $? $@
269
270 ${DEST}/include/afs/pthread_nosigs.h: ${srcdir}/pthread_nosigs.h
271         ${INSTALL} $? $@
272
273 ${DEST}/include/afs/assert.h: ${srcdir}/assert.h
274         ${INSTALL} $? $@
275
276 ${DEST}/include/afs/errors.h: ${srcdir}/errors.h
277         ${INSTALL} $? $@
278
279 ${DEST}/include/afs/vice.h: ${srcdir}/vice.h
280         ${INSTALL} $? $@
281
282 ${DEST}/include/afs/remote.h: ${srcdir}/remote.h
283         ${INSTALL} $? $@
284
285 ${DEST}/include/afs/ktime.h: ${srcdir}/ktime.h
286         ${INSTALL} $? $@
287
288 ${DEST}/include/afs/fileutil.h: ${srcdir}/fileutil.h
289         ${INSTALL} $? $@
290
291 ${DEST}/include/afs/netutils.h: ${srcdir}/netutils.h
292         ${INSTALL} $? $@
293
294 ${DEST}/include/afs/packages.h: ${srcdir}/packages.h
295         ${INSTALL} $? $@
296
297 ${DEST}/include/afs/afsutil.h: ${srcdir}/afsutil.h
298         ${INSTALL} $? $@
299
300 ${DEST}/include/afs/afsutil_prototypes.h: ${srcdir}/afsutil_prototypes.h
301         ${INSTALL} $? $@
302
303 ${DEST}/include/afs/pthread_glock.h: ${srcdir}/pthread_glock.h
304         ${INSTALL} $? $@
305
306 ${DEST}/include/afs/afs_atomlist.h: ${srcdir}/afs_atomlist.h
307         ${INSTALL} $? $@
308
309 ${DEST}/include/afs/afs_lhash.h: ${srcdir}/afs_lhash.h
310         ${INSTALL} $? $@
311
312 ${DEST}/include/potpourri.h: ${srcdir}/potpourri.h
313         ${INSTALL} $? $@
314
315
316 ${DEST}/lib/afs/util.a: util.a
317         ${INSTALL} $? $@
318
319 ${DEST}/lib/afs/libafsutil.a: util.a
320         ${INSTALL} $? $@
321
322
323 ${DEST}/bin/sys: sys
324         ${INSTALL} $? $@
325
326 #
327 # Misc targets
328 #
329
330 clean:
331         $(RM) -f ${objects} sys dirpath.h
332         $(RM) -f util.a *.o core AFS_component_version_number.c
333
334 test:
335         cd test; $(MAKE)
336
337 include ../config/Makefile.version
338
339 dest: \
340         ${DEST}/include/afs/dirpath.h \
341         ${DEST}/include/afs/pthread_nosigs.h \
342         ${DEST}/include/afs/assert.h \
343         ${DEST}/include/afs/errors.h \
344         ${DEST}/include/afs/vice.h \
345         ${DEST}/include/afs/remote.h \
346         ${DEST}/include/afs/ktime.h \
347         ${DEST}/include/afs/fileutil.h \
348         ${DEST}/include/afs/netutils.h \
349         ${DEST}/include/afs/packages.h \
350         ${DEST}/include/afs/afsutil.h \
351         ${DEST}/include/afs/afsutil_prototypes.h \
352         ${DEST}/include/afs/pthread_glock.h \
353         ${DEST}/include/afs/afs_atomlist.h \
354         ${DEST}/include/afs/afs_lhash.h \
355         ${DEST}/include/potpourri.h \
356         ${DEST}/lib/afs/util.a \
357         ${DEST}/lib/afs/libafsutil.a \
358         ${DEST}/bin/sys
359