makefile-updates-20010828
[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 DESTDIR=@DESTDIR@
9 SRCDIR=@SRCDIR@
10 TOP_SRCDIR=@TOP_SRCDIR@
11 SYS_NAME=@AFS_SYSNAME@
12
13 SHELL = /bin/sh
14
15 include ../config/Makefile.${SYS_NAME}
16
17 CFLAGS = ${OPTMZ} -I${TOP_SRCDIR}/config -I. -I$(SRCDIR)include ${XCFLAGS}
18 LDFLAGS = ${OPTMZ} ${XLDFLAGS}
19
20 objects = assert.o base64.o casestrcpy.o ktime.o volparse.o hostparse.o \
21          hputil.o kreltime.o isathing.o get_krbrlm.o uuid.o serverLog.o \
22          dirpath.o fileutil.o netutils.o flipbase64.o \
23          afs_atomlist.o afs_lhash.o snprintf.o ${REGEX_OBJ}
24
25 all: install
26
27 util.a: ${objects} AFS_component_version_number.o
28         rm -f util.a
29         $(AR) r util.a ${objects} AFS_component_version_number.o
30         $(RANLIB) util.a
31
32 volparse.o: volparse.c
33         ${CC} ${CFLAGS} -c volparse.c
34
35 snprintf.o: snprintf.c
36         ${CC} ${CFLAGS} -c snprintf.c
37
38 base64.o: base64.c
39         ${CC} ${CFLAGS} -c base64.c
40
41 hostparse.o: hostparse.c afsutil.h
42         ${CC} ${CFLAGS} -c hostparse.c
43
44 ktime.o: ktime.c
45         ${CC} ${CFLAGS} -c ktime.c
46
47 kreltime.o: kreltime.c
48         ${CC} ${CFLAGS} -c kreltime.c
49
50 get_krbrlm.o: get_krbrlm.c
51         ${CC} ${CFLAGS} -c get_krbrlm.c
52
53 uuid.o: uuid.c
54         ${CC} ${CFLAGS} -c uuid.c
55
56 sys.o: sys.c ${SRCDIR}include/afs/param.h AFS_component_version_number.c
57         ${CC} ${CFLAGS} -c sys.c
58
59 sys: sys.o 
60         ${CC} ${LDFLAGS} -o sys sys.o
61
62 isathing.o: isathing.c
63         ${CC} ${CFLAGS} -c isathing.c
64
65 serverLog.o: serverLog.c
66         ${CC} ${CFLAGS} -c serverLog.c
67
68 dirpath.o: dirpath.c dirpath.h
69         ${CC} ${CFLAGS} -c dirpath.c
70
71 fileutil.o: fileutil.c fileutil.h
72         ${CC} ${CFLAGS} -c fileutil.c
73
74 netutils.o: netutils.c netutils.h
75         ${CC} ${CFLAGS} -c netutils.c
76
77 afs_atomlist.o: afs_atomlist.c afs_atomlist.h
78         ${CC} ${CFLAGS} -c afs_atomlist.c
79
80 afs_lhash.o: afs_lhash.c afs_lhash.h afs_atomlist.h
81         ${CC} ${CFLAGS} -c afs_lhash.c
82
83 #
84 # Install targets
85 #
86 KDIR=../libafs/afs
87 UKDIR=../libuafs/afs
88 INCDIR=${DESTDIR}/include
89 LIBDIR=${DESTDIR}/lib/afs
90
91 install: ukinstall kinstall \
92         ${INCDIR}/afs/dirpath.h \
93         ${INCDIR}/afs/pthread_nosigs.h \
94         ${INCDIR}/afs/assert.h \
95         ${INCDIR}/afs/errors.h \
96         ${INCDIR}/afs/vice.h \
97         ${INCDIR}/afs/remote.h \
98         ${INCDIR}/afs/ktime.h \
99         ${INCDIR}/afs/fileutil.h \
100         ${INCDIR}/afs/netutils.h \
101         ${INCDIR}/afs/packages.h \
102         ${INCDIR}/afs/afsutil.h \
103         ${INCDIR}/afs/pthread_glock.h \
104         ${INCDIR}/afs/afs_atomlist.h \
105         ${INCDIR}/afs/afs_lhash.h \
106         ${INCDIR}/potpourri.h \
107         ${LIBDIR}/util.a \
108         ${LIBDIR}/libafsutil.a \
109         ${DESTDIR}/bin/sys 
110
111 ${INCDIR}/afs/dirpath.h: dirpath.h
112         ${INSTALL} $? $@
113
114 ${INCDIR}/afs/pthread_nosigs.h: pthread_nosigs.h
115         ${INSTALL} $? $@
116
117 ${INCDIR}/afs/assert.h: assert.h
118         ${INSTALL} $? $@
119
120 ${INCDIR}/afs/errors.h: errors.h
121         ${INSTALL} $? $@
122
123 ${INCDIR}/afs/vice.h: vice.h
124         ${INSTALL} $? $@
125
126 ${INCDIR}/afs/remote.h: remote.h
127         ${INSTALL} $? $@
128
129 ${INCDIR}/afs/ktime.h: ktime.h
130         ${INSTALL} $? $@
131
132 ${INCDIR}/afs/fileutil.h: fileutil.h
133         ${INSTALL} $? $@
134
135 ${INCDIR}/afs/netutils.h: netutils.h
136         ${INSTALL} $? $@
137
138 ${INCDIR}/afs/packages.h: packages.h
139         ${INSTALL} $? $@
140
141 ${INCDIR}/afs/afsutil.h: afsutil.h
142         ${INSTALL} $? $@
143
144 ${INCDIR}/afs/pthread_glock.h: pthread_glock.h
145         ${INSTALL} $? $@
146
147 ${INCDIR}/afs/afs_atomlist.h: afs_atomlist.h
148         ${INSTALL} $? $@
149
150 ${INCDIR}/afs/afs_lhash.h: afs_lhash.h
151         ${INSTALL} $? $@
152
153 ${INCDIR}/potpourri.h: potpourri.h
154         ${INSTALL} $? $@
155
156 ${LIBDIR}/util.a: util.a
157         ${INSTALL} $? $@
158
159 ${LIBDIR}/libafsutil.a: util.a
160         ${INSTALL} $? $@
161
162 ${DESTDIR}/bin/sys: sys
163         ${INSTALL} $? $@
164
165 kinstall: ${KDIR}/vice.h \
166         ${KDIR}/afs_base64.c \
167         ${KDIR}/afs_uuid.c \
168         ${KDIR}/afs_atomlist.c \
169         ${KDIR}/afs_atomlist.h \
170         ${KDIR}/afs_lhash.c \
171         ${KDIR}/afs_lhash.h
172
173 ${KDIR}/vice.h: vice.h
174         ${INSTALL} $? $@
175
176 ${KDIR}/afs_base64.c: base64.c
177         ${INSTALL} $? $@
178
179 ${KDIR}/afs_uuid.c: uuid.c
180         ${INSTALL} $? $@
181
182 ${KDIR}/afs_atomlist.c: afs_atomlist.c
183         ${INSTALL} $? $@
184
185 ${KDIR}/afs_atomlist.h: afs_atomlist.h
186         ${INSTALL} $? $@
187
188 ${KDIR}/afs_lhash.c: afs_lhash.c
189         ${INSTALL} $? $@
190
191 ${KDIR}/afs_lhash.h: afs_lhash.h
192         ${INSTALL} $? $@
193
194 ukinstall: \
195         ${UKDIR}/afs_uuid.c \
196         ${UKDIR}/afs_atomlist.c \
197         ${UKDIR}/afs_atomlist.h \
198         ${UKDIR}/afs_lhash.c \
199         ${UKDIR}/afs_lhash.h \
200         ${UKDIR}/pthread_glock.h \
201         ${UKDIR}/vice.h \
202         ${UKDIR}/errors.h \
203         ${UKDIR}/afsutil.h \
204         ${UKDIR}/dirpath.h \
205         ${UKDIR}/dirpath.c \
206         ${UKDIR}/fileutil.h \
207         ${UKDIR}/fileutil.c \
208         ${UKDIR}/netutils.h \
209         ${UKDIR}/netutils.c \
210         ${UKDIR}/casestrcpy.c \
211         ${UKDIR}/hostparse.c 
212
213 ${UKDIR}/errors.h: errors.h
214         ${INSTALL} $? $@
215
216 ${UKDIR}/afsutil.h: afsutil.h
217         ${INSTALL} $? $@
218
219 ${UKDIR}/dirpath.h: dirpath.h
220         ${INSTALL} $? $@
221
222 ${UKDIR}/dirpath.c: dirpath.c
223         ${INSTALL} $? $@
224
225 ${UKDIR}/fileutil.h: fileutil.h
226         ${INSTALL} $? $@
227
228 ${UKDIR}/fileutil.c: fileutil.c
229         ${INSTALL} $? $@
230
231 ${UKDIR}/netutils.h: netutils.h
232         ${INSTALL} $? $@
233
234 ${UKDIR}/netutils.c: netutils.c
235         ${INSTALL} $? $@
236
237 ${UKDIR}/casestrcpy.c: casestrcpy.c
238         ${INSTALL} $? $@
239
240 ${UKDIR}/hostparse.c: hostparse.c
241         ${INSTALL} $? $@
242
243 ${UKDIR}/pthread_glock.h: pthread_glock.h
244         ${INSTALL} $? $@
245
246 ${UKDIR}/vice.h: vice.h
247         ${INSTALL} $? $@
248
249 ${UKDIR}/afs_uuid.c: uuid.c
250         ${INSTALL} $? $@
251
252 ${UKDIR}/afs_atomlist.c: afs_atomlist.c
253         ${INSTALL} $? $@
254
255 ${UKDIR}/afs_atomlist.h: afs_atomlist.h
256         ${INSTALL} $? $@
257
258 ${UKDIR}/afs_lhash.c: afs_lhash.c
259         ${INSTALL} $? $@
260
261 ${UKDIR}/afs_lhash.h: afs_lhash.h
262         ${INSTALL} $? $@
263
264 #
265 # Misc targets
266 #
267
268 clean:
269         rm -f ${objects} sys
270         rm -f util.a *.o core AFS_component_version_number.c
271
272 test:
273         cd test; $(MAKE)
274
275 include ../config/Makefile.version