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