makefiles-attempt-to-support-gmake-j-20011023
[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 DEST=@DEST@
9 TOP_INCDIR=@TOP_INCDIR@
10 TOP_LIBDIR=@TOP_LIBDIR@
11 TOP_OBJDIR=@TOP_OBJDIR@
12 srcdir=@srcdir@
13 VPATH=${srcdir}
14 bindir=@bindir@
15 sbindir=@sbindir@
16 libexecdir=@libexecdir@
17 libdir=@libdir@
18 includedir=@includedir@
19 mandir=@mandir@
20 sysconfdir=@sysconfdir@
21 localstatedir=@localstatedir@
22 COMPILE_ET=${TOP_OBJDIR}/src/comerr/compile_et
23 RXGEN=${TOP_OBJDIR}/src/rxgen/rxgen
24 TOP_SRCDIR=@TOP_SRCDIR@
25 SYS_NAME=@AFS_SYSNAME@
26 prefix=@prefix@
27 exec_prefix=@exec_prefix@
28 afsconfdir=@afsconfdir@
29 viceetcdir=@viceetcdir@
30 afssrvbindir=@afssrvbindir@
31 afssrvsbindir=@afssrvsbindir@
32 afssrvlibexecdir=@afssrvlibexecdir@
33 afsdbdir=@afsdbdir@
34 afslogsdir=@afslogsdir@
35 afslocaldir=@afslocaldir@
36 afsbackupdir=@afsbackupdir@
37 afsbosconfigdir=@afsbosconfigdir@
38
39 SHELL = /bin/sh
40
41 include ../config/Makefile.${SYS_NAME}
42
43 CFLAGS=-I. -I${srcdir} ${OPTMZ} -I${TOP_OBJDIR}/src/config -I. -I${TOP_INCDIR} ${XCFLAGS}
44 LDFLAGS = ${OPTMZ} ${XLDFLAGS}
45
46 objects = assert.o base64.o casestrcpy.o ktime.o volparse.o hostparse.o \
47          hputil.o kreltime.o isathing.o get_krbrlm.o uuid.o serverLog.o \
48          dirpath.o fileutil.o netutils.o flipbase64.o \
49          afs_atomlist.o afs_lhash.o snprintf.o ${REGEX_OBJ}
50
51 all: ukinstall kinstall \
52         ${TOP_INCDIR}/afs/dirpath.h \
53         ${TOP_INCDIR}/afs/pthread_nosigs.h \
54         ${TOP_INCDIR}/afs/assert.h \
55         ${TOP_INCDIR}/afs/errors.h \
56         ${TOP_INCDIR}/afs/vice.h \
57         ${TOP_INCDIR}/afs/remote.h \
58         ${TOP_INCDIR}/afs/ktime.h \
59         ${TOP_INCDIR}/afs/fileutil.h \
60         ${TOP_INCDIR}/afs/netutils.h \
61         ${TOP_INCDIR}/afs/packages.h \
62         ${TOP_INCDIR}/afs/afsutil.h \
63         ${TOP_INCDIR}/afs/pthread_glock.h \
64         ${TOP_INCDIR}/afs/afs_atomlist.h \
65         ${TOP_INCDIR}/afs/afs_lhash.h \
66         ${TOP_INCDIR}/potpourri.h \
67         ${TOP_LIBDIR}/util.a \
68         ${TOP_LIBDIR}/libafsutil.a \
69         sys
70
71 dirpath.h: ${srcdir}/dirpath.hin Makefile
72         ( sed \
73                 -e "s+@afsconfdir+${afsconfdir}+" \
74                 -e "s+@viceetcdir+${viceetcdir}+" \
75                 -e "s+@afssrvbindir+${afssrvbindir}+" \
76                 -e "s+@afssrvsbindir+${afssrvsbindir}+" \
77                 -e "s+@afssrvlibexecdir+${afssrvlibexecdir}+" \
78                 -e "s+@afsdbdir+${afsdbdir}+" \
79                 -e "s+@afslogsdir+${afslogsdir}+" \
80                 -e "s+@afslocaldir+${afslocaldir}+" \
81                 -e "s+@afsbackupdir+${afsbackupdir}+" \
82                 -e "s+@afsbosconfigdir+${afsbosconfigdir}+" \
83                 ${srcdir}/dirpath.hin >dirpath.h.tmp && \
84                 mv dirpath.h.tmp dirpath.h )
85
86 util.a: ${objects} AFS_component_version_number.o
87         $(RM) -f util.a
88         $(AR) crv util.a ${objects} AFS_component_version_number.o
89         $(RANLIB) util.a
90
91 assert.o: ${srcdir}/assert.c
92         ${CC} ${CFLAGS} -c ${srcdir}/assert.c
93
94 casestrcpy.o: ${srcdir}/casestrcpy.c
95         ${CC} ${CFLAGS} -c ${srcdir}/casestrcpy.c
96
97 hputil.o: ${srcdir}/hputil.c
98         ${CC} ${CFLAGS} -c ${srcdir}/hputil.c
99
100 flipbase64.o: ${srcdir}/flipbase64.c ${TOP_INCDIR}/afs/dirpath.h
101         ${CC} ${CFLAGS} -c ${srcdir}/flipbase64.c
102
103 volparse.o: ${srcdir}/volparse.c
104         ${CC} ${CFLAGS} -c ${srcdir}/volparse.c
105
106 snprintf.o: ${srcdir}/snprintf.c
107         ${CC} ${CFLAGS} -c ${srcdir}/snprintf.c
108
109 base64.o: ${srcdir}/base64.c
110         ${CC} ${CFLAGS} -c ${srcdir}/base64.c
111
112 hostparse.o: ${srcdir}/hostparse.c ${srcdir}/afsutil.h ${TOP_INCDIR}/afs/dirpath.h
113         ${CC} ${CFLAGS} -c ${srcdir}/hostparse.c
114
115 ktime.o: ${srcdir}/ktime.c ${TOP_INCDIR}/afs/dirpath.h
116         ${CC} ${CFLAGS} -c ${srcdir}/ktime.c
117
118 kreltime.o: ${srcdir}/kreltime.c ${TOP_INCDIR}/afs/dirpath.h
119         ${CC} ${CFLAGS} -c ${srcdir}/kreltime.c
120
121 get_krbrlm.o: ${srcdir}/get_krbrlm.c ${TOP_INCDIR}/afs/dirpath.h
122         ${CC} ${CFLAGS} -c ${srcdir}/get_krbrlm.c
123
124 uuid.o: ${srcdir}/uuid.c ${TOP_INCDIR}/afs/dirpath.h
125         ${CC} ${CFLAGS} -c ${srcdir}/uuid.c
126
127 sys.o: ${srcdir}/sys.c ${TOP_INCDIR}/afs/param.h AFS_component_version_number.c
128         ${CC} ${CFLAGS} -c ${srcdir}/sys.c
129
130 sys: sys.o 
131         ${CC} ${LDFLAGS} -o sys sys.o
132
133 isathing.o: ${srcdir}/isathing.c
134         ${CC} ${CFLAGS} -c ${srcdir}/isathing.c
135
136 serverLog.o: ${srcdir}/serverLog.c ${TOP_INCDIR}/afs/dirpath.h
137         ${CC} ${CFLAGS} -c ${srcdir}/serverLog.c
138
139 dirpath.o: ${srcdir}/dirpath.c ${TOP_INCDIR}/afs/dirpath.h
140         ${CC} ${CFLAGS} -c ${srcdir}/dirpath.c
141
142 fileutil.o: ${srcdir}/fileutil.c ${srcdir}/fileutil.h
143         ${CC} ${CFLAGS} -c ${srcdir}/fileutil.c
144
145 netutils.o: ${srcdir}/netutils.c ${srcdir}/netutils.h
146         ${CC} ${CFLAGS} -c ${srcdir}/netutils.c
147
148 afs_atomlist.o: ${srcdir}/afs_atomlist.c ${srcdir}/afs_atomlist.h
149         ${CC} ${CFLAGS} -c ${srcdir}/afs_atomlist.c
150
151 afs_lhash.o: ${srcdir}/afs_lhash.c ${srcdir}/afs_lhash.h ${srcdir}/afs_atomlist.h
152         ${CC} ${CFLAGS} -c ${srcdir}/afs_lhash.c
153
154 #
155 # Install targets
156 #
157 KDIR=../libafs/afs
158 UKDIR=../libuafs/afs
159
160 install: \
161         ${DESTDIR}${includedir}/afs/dirpath.h \
162         ${DESTDIR}${includedir}/afs/pthread_nosigs.h \
163         ${DESTDIR}${includedir}/afs/assert.h \
164         ${DESTDIR}${includedir}/afs/errors.h \
165         ${DESTDIR}${includedir}/afs/vice.h \
166         ${DESTDIR}${includedir}/afs/remote.h \
167         ${DESTDIR}${includedir}/afs/ktime.h \
168         ${DESTDIR}${includedir}/afs/fileutil.h \
169         ${DESTDIR}${includedir}/afs/netutils.h \
170         ${DESTDIR}${includedir}/afs/packages.h \
171         ${DESTDIR}${includedir}/afs/afsutil.h \
172         ${DESTDIR}${includedir}/afs/pthread_glock.h \
173         ${DESTDIR}${includedir}/afs/afs_atomlist.h \
174         ${DESTDIR}${includedir}/afs/afs_lhash.h \
175         ${DESTDIR}${includedir}/potpourri.h \
176         ${DESTDIR}${libdir}/afs/util.a \
177         ${DESTDIR}${libdir}/afs/libafsutil.a \
178         ${DESTDIR}${bindir}/sys
179
180 ${TOP_INCDIR}/afs/dirpath.h: dirpath.h
181         ${INSTALL} $? $@
182
183 ${TOP_INCDIR}/afs/pthread_nosigs.h: ${srcdir}/pthread_nosigs.h
184         ${INSTALL} $? $@
185
186 ${TOP_INCDIR}/afs/assert.h: ${srcdir}/assert.h
187         ${INSTALL} $? $@
188
189 ${TOP_INCDIR}/afs/errors.h: ${srcdir}/errors.h
190         ${INSTALL} $? $@
191
192 ${TOP_INCDIR}/afs/vice.h: ${srcdir}/vice.h
193         ${INSTALL} $? $@
194
195 ${TOP_INCDIR}/afs/remote.h: ${srcdir}/remote.h
196         ${INSTALL} $? $@
197
198 ${TOP_INCDIR}/afs/ktime.h: ${srcdir}/ktime.h
199         ${INSTALL} $? $@
200
201 ${TOP_INCDIR}/afs/fileutil.h: ${srcdir}/fileutil.h
202         ${INSTALL} $? $@
203
204 ${TOP_INCDIR}/afs/netutils.h: ${srcdir}/netutils.h
205         ${INSTALL} $? $@
206
207 ${TOP_INCDIR}/afs/packages.h: ${srcdir}/packages.h
208         ${INSTALL} $? $@
209
210 ${TOP_INCDIR}/afs/afsutil.h: ${srcdir}/afsutil.h
211         ${INSTALL} $? $@
212
213 ${TOP_INCDIR}/afs/pthread_glock.h: ${srcdir}/pthread_glock.h
214         ${INSTALL} $? $@
215
216 ${TOP_INCDIR}/afs/afs_atomlist.h: ${srcdir}/afs_atomlist.h
217         ${INSTALL} $? $@
218
219 ${TOP_INCDIR}/afs/afs_lhash.h: ${srcdir}/afs_lhash.h
220         ${INSTALL} $? $@
221
222 ${TOP_INCDIR}/potpourri.h: ${srcdir}/potpourri.h
223         ${INSTALL} $? $@
224
225
226 ${TOP_LIBDIR}/util.a: util.a
227         ${INSTALL} $? $@
228
229 ${TOP_LIBDIR}/libafsutil.a: util.a
230         ${INSTALL} $? $@
231
232
233 ${DESTDIR}${includedir}/afs/dirpath.h: dirpath.h
234         ${INSTALL} $? $@
235
236 ${DESTDIR}${includedir}/afs/pthread_nosigs.h: ${srcdir}/pthread_nosigs.h
237         ${INSTALL} $? $@
238
239 ${DESTDIR}${includedir}/afs/assert.h: ${srcdir}/assert.h
240         ${INSTALL} $? $@
241
242 ${DESTDIR}${includedir}/afs/errors.h: ${srcdir}/errors.h
243         ${INSTALL} $? $@
244
245 ${DESTDIR}${includedir}/afs/vice.h: ${srcdir}/vice.h
246         ${INSTALL} $? $@
247
248 ${DESTDIR}${includedir}/afs/remote.h: ${srcdir}/remote.h
249         ${INSTALL} $? $@
250
251 ${DESTDIR}${includedir}/afs/ktime.h: ${srcdir}/ktime.h
252         ${INSTALL} $? $@
253
254 ${DESTDIR}${includedir}/afs/fileutil.h: ${srcdir}/fileutil.h
255         ${INSTALL} $? $@
256
257 ${DESTDIR}${includedir}/afs/netutils.h: ${srcdir}/netutils.h
258         ${INSTALL} $? $@
259
260 ${DESTDIR}${includedir}/afs/packages.h: ${srcdir}/packages.h
261         ${INSTALL} $? $@
262
263 ${DESTDIR}${includedir}/afs/afsutil.h: ${srcdir}/afsutil.h
264         ${INSTALL} $? $@
265
266 ${DESTDIR}${includedir}/afs/pthread_glock.h: ${srcdir}/pthread_glock.h
267         ${INSTALL} $? $@
268
269 ${DESTDIR}${includedir}/afs/afs_atomlist.h: ${srcdir}/afs_atomlist.h
270         ${INSTALL} $? $@
271
272 ${DESTDIR}${includedir}/afs/afs_lhash.h: ${srcdir}/afs_lhash.h
273         ${INSTALL} $? $@
274
275 ${DESTDIR}${includedir}/potpourri.h: ${srcdir}/potpourri.h
276         ${INSTALL} $? $@
277
278
279 ${DESTDIR}${libdir}/afs/util.a: util.a
280         ${INSTALL} $? $@
281
282 ${DESTDIR}${libdir}/afs/libafsutil.a: util.a
283         ${INSTALL} $? $@
284
285
286 ${DESTDIR}${bindir}/sys: sys
287         ${INSTALL} $? $@
288
289
290 ${DEST}/include/afs/dirpath.h: dirpath.h
291         ${INSTALL} $? $@
292
293 ${DEST}/include/afs/pthread_nosigs.h: ${srcdir}/pthread_nosigs.h
294         ${INSTALL} $? $@
295
296 ${DEST}/include/afs/assert.h: ${srcdir}/assert.h
297         ${INSTALL} $? $@
298
299 ${DEST}/include/afs/errors.h: ${srcdir}/errors.h
300         ${INSTALL} $? $@
301
302 ${DEST}/include/afs/vice.h: ${srcdir}/vice.h
303         ${INSTALL} $? $@
304
305 ${DEST}/include/afs/remote.h: ${srcdir}/remote.h
306         ${INSTALL} $? $@
307
308 ${DEST}/include/afs/ktime.h: ${srcdir}/ktime.h
309         ${INSTALL} $? $@
310
311 ${DEST}/include/afs/fileutil.h: ${srcdir}/fileutil.h
312         ${INSTALL} $? $@
313
314 ${DEST}/include/afs/netutils.h: ${srcdir}/netutils.h
315         ${INSTALL} $? $@
316
317 ${DEST}/include/afs/packages.h: ${srcdir}/packages.h
318         ${INSTALL} $? $@
319
320 ${DEST}/include/afs/afsutil.h: ${srcdir}/afsutil.h
321         ${INSTALL} $? $@
322
323 ${DEST}/include/afs/pthread_glock.h: ${srcdir}/pthread_glock.h
324         ${INSTALL} $? $@
325
326 ${DEST}/include/afs/afs_atomlist.h: ${srcdir}/afs_atomlist.h
327         ${INSTALL} $? $@
328
329 ${DEST}/include/afs/afs_lhash.h: ${srcdir}/afs_lhash.h
330         ${INSTALL} $? $@
331
332 ${DEST}/include/potpourri.h: ${srcdir}/potpourri.h
333         ${INSTALL} $? $@
334
335
336 ${DEST}/lib/afs/util.a: util.a
337         ${INSTALL} $? $@
338
339 ${DEST}/lib/afs/libafsutil.a: util.a
340         ${INSTALL} $? $@
341
342
343 ${DEST}/bin/sys: sys
344         ${INSTALL} $? $@
345
346
347 kinstall: ${KDIR}/vice.h \
348         ${KDIR}/afs_base64.c \
349         ${KDIR}/afs_uuid.c \
350         ${KDIR}/afs_atomlist.c \
351         ${KDIR}/afs_atomlist.h \
352         ${KDIR}/afs_lhash.c \
353         ${KDIR}/afs_lhash.h
354
355 ${KDIR}/vice.h: ${srcdir}/vice.h
356         ${INSTALL} $? $@
357
358 ${KDIR}/afs_base64.c: ${srcdir}/base64.c
359         ${INSTALL} $? $@
360
361 ${KDIR}/afs_uuid.c: ${srcdir}/uuid.c
362         ${INSTALL} $? $@
363
364 ${KDIR}/afs_atomlist.c: ${srcdir}/afs_atomlist.c
365         ${INSTALL} $? $@
366
367 ${KDIR}/afs_atomlist.h: ${srcdir}/afs_atomlist.h
368         ${INSTALL} $? $@
369
370 ${KDIR}/afs_lhash.c: ${srcdir}/afs_lhash.c
371         ${INSTALL} $? $@
372
373 ${KDIR}/afs_lhash.h: ${srcdir}/afs_lhash.h
374         ${INSTALL} $? $@
375
376 ukinstall: \
377         ${UKDIR}/afs_uuid.c \
378         ${UKDIR}/afs_atomlist.c \
379         ${UKDIR}/afs_atomlist.h \
380         ${UKDIR}/afs_lhash.c \
381         ${UKDIR}/afs_lhash.h \
382         ${UKDIR}/pthread_glock.h \
383         ${UKDIR}/vice.h \
384         ${UKDIR}/errors.h \
385         ${UKDIR}/afsutil.h \
386         ${UKDIR}/dirpath.h \
387         ${UKDIR}/dirpath.c \
388         ${UKDIR}/fileutil.h \
389         ${UKDIR}/fileutil.c \
390         ${UKDIR}/netutils.h \
391         ${UKDIR}/netutils.c \
392         ${UKDIR}/casestrcpy.c \
393         ${UKDIR}/hostparse.c 
394
395 ${UKDIR}/errors.h: ${srcdir}/errors.h
396         ${INSTALL} $? $@
397
398 ${UKDIR}/afsutil.h: ${srcdir}/afsutil.h
399         ${INSTALL} $? $@
400
401 ${UKDIR}/dirpath.h: dirpath.h
402         ${INSTALL} $? $@
403
404 ${UKDIR}/dirpath.c: ${srcdir}/dirpath.c
405         ${INSTALL} $? $@
406
407 ${UKDIR}/fileutil.h: ${srcdir}/fileutil.h
408         ${INSTALL} $? $@
409
410 ${UKDIR}/fileutil.c: ${srcdir}/fileutil.c
411         ${INSTALL} $? $@
412
413 ${UKDIR}/netutils.h: ${srcdir}/netutils.h
414         ${INSTALL} $? $@
415
416 ${UKDIR}/netutils.c: ${srcdir}/netutils.c
417         ${INSTALL} $? $@
418
419 ${UKDIR}/casestrcpy.c: ${srcdir}/casestrcpy.c
420         ${INSTALL} $? $@
421
422 ${UKDIR}/hostparse.c: ${srcdir}/hostparse.c
423         ${INSTALL} $? $@
424
425 ${UKDIR}/pthread_glock.h: ${srcdir}/pthread_glock.h
426         ${INSTALL} $? $@
427
428 ${UKDIR}/vice.h: ${srcdir}/vice.h
429         ${INSTALL} $? $@
430
431 ${UKDIR}/afs_uuid.c: ${srcdir}/uuid.c
432         ${INSTALL} $? $@
433
434 ${UKDIR}/afs_atomlist.c: ${srcdir}/afs_atomlist.c
435         ${INSTALL} $? $@
436
437 ${UKDIR}/afs_atomlist.h: ${srcdir}/afs_atomlist.h
438         ${INSTALL} $? $@
439
440 ${UKDIR}/afs_lhash.c: ${srcdir}/afs_lhash.c
441         ${INSTALL} $? $@
442
443 ${UKDIR}/afs_lhash.h: ${srcdir}/afs_lhash.h
444         ${INSTALL} $? $@
445
446 #
447 # Misc targets
448 #
449
450 clean:
451         $(RM) -f ${objects} sys dirpath.h
452         $(RM) -f util.a *.o core AFS_component_version_number.c
453
454 test:
455         cd test; $(MAKE)
456
457 include ../config/Makefile.version
458
459 dest: \
460         ${DEST}/include/afs/dirpath.h \
461         ${DEST}/include/afs/pthread_nosigs.h \
462         ${DEST}/include/afs/assert.h \
463         ${DEST}/include/afs/errors.h \
464         ${DEST}/include/afs/vice.h \
465         ${DEST}/include/afs/remote.h \
466         ${DEST}/include/afs/ktime.h \
467         ${DEST}/include/afs/fileutil.h \
468         ${DEST}/include/afs/netutils.h \
469         ${DEST}/include/afs/packages.h \
470         ${DEST}/include/afs/afsutil.h \
471         ${DEST}/include/afs/pthread_glock.h \
472         ${DEST}/include/afs/afs_atomlist.h \
473         ${DEST}/include/afs/afs_lhash.h \
474         ${DEST}/include/potpourri.h \
475         ${DEST}/lib/afs/util.a \
476         ${DEST}/lib/afs/libafsutil.a \
477         ${DEST}/bin/sys
478