prototypes-fixes-20020821
[openafs.git] / src / rxkad / 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
11 CFLAGS=-I. -I${srcdir} ${OPTMZ} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
12 INCLS=${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \
13         ${TOP_INCDIR}/rx/fcrypt.h \
14         rxkad.h rxkad_prototypes.h fcrypt.h
15
16 OBJS=rxkad_client.o rxkad_server.o rxkad_common.o ticket.o rxkad_errs.o \
17         fcrypt.o crypt_conn.o
18
19 fc_test_OBJS=fc_test.o
20
21 fc_test_LIBS=\
22         ${TOP_LIBDIR}/librxkad.a \
23         ${TOP_LIBDIR}/librx.a \
24         ${TOP_LIBDIR}/liblwp.a \
25         ${TOP_LIBDIR}/libsys.a
26
27 all: kinstall ukinstall ${TOP_LIBDIR}/librxkad.a fc_test \
28         ${TOP_INCDIR}/rx/rxkad.h ${TOP_INCDIR}/rx/rxkad_prototypes.h \
29         ${TOP_INCDIR}/rx/fcrypt.h
30
31 #
32 # Install targets
33 #
34 kinstall: \
35         ${KERNELDIR}/afs/private_data.h \
36         ${KERNELDIR}/afs/rxkad.h \
37         ${KERNELDIR}/afs/rxkad_prototypes.h \
38         ${KERNELDIR}/afs/sboxes.h \
39         ${KERNELDIR}/afs/fcrypt.h \
40         ${KERNELDIR}/afs/fcrypt.c \
41         ${KERNELDIR}/afs/crypt_conn.c \
42         ${KERNELDIR}/afs/rxkad_client.c \
43         ${KERNELDIR}/afs/rxkad_common.c 
44
45 ${KERNELDIR}/afs/private_data.h: private_data.h
46         ${INSTALL} $? $@
47
48 ${KERNELDIR}/afs/rxkad.h: rxkad.h
49         ${INSTALL} $? $@
50
51 ${KERNELDIR}/afs/rxkad_prototypes.h: rxkad_prototypes.h
52         ${INSTALL} $? $@
53
54 ${KERNELDIR}/afs/sboxes.h: sboxes.h
55         ${INSTALL} $? $@
56
57 ${KERNELDIR}/afs/fcrypt.h: fcrypt.h
58         ${INSTALL} $? $@
59
60 ${KERNELDIR}/afs/fcrypt.c: fcrypt.c
61         ${INSTALL} $? $@
62
63 ${KERNELDIR}/afs/crypt_conn.c: crypt_conn.c
64         ${INSTALL} $? $@
65
66 ${KERNELDIR}/afs/rxkad_client.c: rxkad_client.c
67         ${INSTALL} $? $@
68
69 ${KERNELDIR}/afs/rxkad_common.c: rxkad_common.c
70         ${INSTALL} $? $@
71
72 ukinstall: \
73         ${UKERNELDIR}/afs \
74         ${UKERNELDIR}/rx \
75         ${UKERNELDIR}/afs/private_data.h \
76         ${UKERNELDIR}/afs/rxkad.h \
77         ${UKERNELDIR}/afs/rxkad_prototypes.h \
78         ${UKERNELDIR}/afs/fcrypt.h \
79         ${UKERNELDIR}/rx/rxkad.h \
80         ${UKERNELDIR}/rx/rxkad_prototypes.h \
81         ${UKERNELDIR}/rx/fcrypt.h \
82         ${UKERNELDIR}/afs/sboxes.h \
83         ${UKERNELDIR}/afs/fcrypt.c \
84         ${UKERNELDIR}/afs/crypt_conn.c \
85         ${UKERNELDIR}/afs/rxkad_client.c \
86         ${UKERNELDIR}/afs/rxkad_common.c \
87         ${UKERNELDIR}/afs/ticket.c \
88         ${UKERNELDIR}/afs/rxkad_server.c \
89         ${UKERNELDIR}/afs/lifetimes.h \
90         ${UKERNELDIR}/afs/rxkad_errs.c 
91
92
93 ${UKERNELDIR}/afs:
94         mkdir -p $?
95
96 ${UKERNELDIR}/rx:
97         mkdir -p $?
98
99 ${UKERNELDIR}/afs/private_data.h: private_data.h
100         ${INSTALL} $? $@
101
102 ${UKERNELDIR}/afs/rxkad.h: rxkad.h
103         ${INSTALL} $? $@
104
105 ${UKERNELDIR}/afs/rxkad_prototypes.h: rxkad_prototypes.h
106         ${INSTALL} $? $@
107
108 ${UKERNELDIR}/afs/fcrypt.h: fcrypt.h
109         ${INSTALL} $? $@
110
111 ${UKERNELDIR}/rx/rxkad_prototypes.h: rxkad_prototypes.h
112         ${INSTALL} $? $@
113
114 ${UKERNELDIR}/afs/lifetimes.h: lifetimes.h
115         ${INSTALL} $? $@
116
117 ${UKERNELDIR}/afs/ticket.c: ticket.c
118         ${INSTALL} $? $@
119
120 ${UKERNELDIR}/afs/sboxes.h: sboxes.h
121         ${INSTALL} $? $@
122
123 ${UKERNELDIR}/afs/fcrypt.c: fcrypt.c
124         ${INSTALL} $? $@
125
126 ${UKERNELDIR}/afs/crypt_conn.c: crypt_conn.c
127         ${INSTALL} $? $@
128
129 ${UKERNELDIR}/afs/rxkad_client.c: rxkad_client.c
130         ${INSTALL} $? $@
131
132 ${UKERNELDIR}/afs/rxkad_errs.c: rxkad_errs.c
133         ${INSTALL} $? $@
134
135 ${UKERNELDIR}/afs/rxkad_server.c: rxkad_server.c
136         ${INSTALL} $? $@
137
138 ${UKERNELDIR}/afs/rxkad_common.c: rxkad_common.c
139         ${INSTALL} $? $@
140
141 ${UKERNELDIR}/rx/rxkad.h: rxkad.h
142         ${INSTALL} $? $@
143
144 ${UKERNELDIR}/rx/fcrypt.h: fcrypt.h
145         ${INSTALL} $? $@
146
147 install:   \
148         ${DESTDIR}${libdir}/librxkad.a \
149         ${DESTDIR}${includedir}/rx/fcrypt.h \
150         ${DESTDIR}${includedir}/rx/rxkad.h \
151         ${DESTDIR}${includedir}/rx/rxkad_prototypes.h
152
153 ${DEST}/lib/librxkad.a: librxkad.a
154         ${INSTALL} $? $@
155
156 ${DEST}/include/rx/fcrypt.h: fcrypt.h
157         ${INSTALL} $? $@
158
159 ${DEST}/include/rx/rxkad.h: rxkad.h
160         ${INSTALL} $? $@
161
162 ${DEST}/include/rx/rxkad_prototypes.h: rxkad_prototypes.h
163         ${INSTALL} $? $@
164
165 #
166 # Build targets
167 #
168
169 librxkad.a: ${OBJS} AFS_component_version_number.o
170         -$(RM) -f $@
171         $(AR) crv $@ ${OBJS} AFS_component_version_number.o
172         $(RANLIB) $@
173
174 crypt_conn.o: fcrypt.h private_data.h crypt_conn.c ${INCLS}
175
176 rxkad_client.o: fcrypt.h private_data.h rxkad_client.c ${INCLS}
177
178 rxkad_server.o: fcrypt.h private_data.h rxkad_server.c ${INCLS}
179
180 rxkad_common.o: fcrypt.h private_data.h rxkad_common.c ${INCLS}
181
182 rxkad_errs.o: rxkad_errs.c
183
184 rxkad_errs.c rxkad.h: rxkad_errs.et rxkad.p.h
185         $(RM) -f rxkad.h rxkad_errs.c
186         ${COMPILE_ET} -p ${srcdir} rxkad_errs -h rxkad
187
188 ticket.o: ticket.c lifetimes.h ${INCLS}
189
190 fcrypt.o: fcrypt.c fcrypt.h sboxes.h rxkad.h rxkad_prototypes.h
191         ${CC} ${CFLAGS} -c fcrypt.c
192
193 tcrypt: tcrypt.o librxkad.a 
194         ${CC} -o tcrypt tcrypt.o librxkad.a
195
196 tcrypt.o: tcrypt.c AFS_component_version_number.o
197
198 fc_test: ${fc_test_OBJS}
199         ${CC} ${CFLAGS} -o fc_test ${fc_test_OBJS} ${fc_test_LIBS} ${XLIBS}
200
201 fc_test.o: ${INCLS}
202
203 #
204 # Misc. targets
205 #
206
207 clean: 
208         $(RM) -f *.o *.a tcrypt core rxkad_errs.c rxkad.h \
209                 AFS_component_version_number.c \
210                 crypt_conn.c fcrypt.c fcrypt.h sboxes.h \
211                 fc_test
212
213 test:
214         cd test; $(MAKE)
215
216 # These sources are kept in a separate directory so that we can use an
217 # ACL to comply with source export restrictions.
218
219 crypt_conn.c: domestic/crypt_conn.c
220         ${INSTALL} $? $@
221
222 fcrypt.c: domestic/fcrypt.c
223         ${INSTALL} $? $@
224
225 fcrypt.h: domestic/fcrypt.h
226         ${INSTALL} $? $@
227
228 sboxes.h: domestic/sboxes.h
229         ${INSTALL} $? $@
230
231 tcrypt.c: domestic/tcrypt.c
232         ${INSTALL} $? $@
233
234 include ../config/Makefile.version
235 ${DESTDIR}${libdir}/librxkad.a: librxkad.a
236         ${INSTALL} $? $@
237
238 ${TOP_LIBDIR}/librxkad.a: librxkad.a
239         ${INSTALL} $? $@
240
241 ${DESTDIR}${includedir}/rx/fcrypt.h: fcrypt.h
242         ${INSTALL} $? $@
243
244 ${DESTDIR}${includedir}/rx/rxkad.h: rxkad.h
245         ${INSTALL} $? $@
246
247 ${DESTDIR}${includedir}/rx/rxkad_prototypes.h: rxkad_prototypes.h
248         ${INSTALL} $? $@
249
250 ${TOP_INCDIR}/rx/fcrypt.h: fcrypt.h
251         ${INSTALL} $? $@
252
253 ${TOP_INCDIR}/rx/rxkad.h: rxkad.h
254         ${INSTALL} $? $@
255
256 ${TOP_INCDIR}/rx/rxkad_prototypes.h: rxkad_prototypes.h
257         ${INSTALL} $? $@
258
259 dest:   \
260         ${DEST}/lib/librxkad.a \
261         ${DEST}/include/rx/fcrypt.h \
262         ${DEST}/include/rx/rxkad.h \
263         ${DEST}/include/rx/rxkad_prototypes.h
264