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