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