venus-kdump-build-from-srcdir-20011023
[openafs.git] / src / auth / 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 DEST=@DEST@
9 TOP_INCDIR=@TOP_INCDIR@
10 TOP_LIBDIR=@TOP_LIBDIR@
11 TOP_OBJDIR=@TOP_OBJDIR@
12 srcdir=@srcdir@
13 VPATH=${srcdir}
14 prefix=@prefix@
15 exec_prefix=@exec_prefix@
16 bindir=@bindir@
17 sbindir=@sbindir@
18 libexecdir=@libexecdir@
19 libdir=@libdir@
20 includedir=@includedir@
21 mandir=@mandir@
22 afssrvbindir=@afssrvbindir@
23 afssrvsbindir=@afssrvsbindir@
24 afssrvlibexecdir=@afssrvlibexecdir@
25 RXGEN=${TOP_OBJDIR}/src/rxgen/rxgen
26 TOP_SRCDIR=@TOP_SRCDIR@
27 SYS_NAME=@AFS_SYSNAME@
28
29 SHELL = /bin/sh
30
31 include ../config/Makefile.${SYS_NAME}
32
33 KERNELDIR = ../libafs/
34 UKERNELDIR = ../libuafs/
35 COMPILE_ET=${TOP_OBJDIR}/src/comerr/compile_et
36 OBJS= cellconfig.o ktc.o userok.o writeconfig.o authcon.o \
37     acfg_errors.o ktc_errors.o
38 KOBJS= cellconfig.o ktc.krb.o userok.o writeconfig.o authcon.o \
39     acfg_errors.o ktc_errors.o
40
41 CFLAGS=-g -I. -I${srcdir} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
42 LIBS=libauth.a ${TOP_LIBDIR}/libsys.a \
43       ${TOP_LIBDIR}/librxkad.a ${TOP_LIBDIR}/libdes.a \
44       ${TOP_LIBDIR}/librx.a ${TOP_LIBDIR}/libsys.a \
45       ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/util.a ${XLIBS}
46 INCLS=cellconfig.h auth.h keys.h
47 KSRCS=auth.h
48 UKSRCS=${KSRCS} cellconfig.h acfg_errors.c keys.h cellconfig.c \
49        ktc.c authcon.c ktc_errors.c
50
51 all: kinstall ukinstall ${TOP_LIBDIR}/libauth.a ${TOP_LIBDIR}/libauth.krb.a ${TOP_INCDIR}/afs/keys.h ${TOP_INCDIR}/afs/cellconfig.h ${TOP_INCDIR}/afs/auth.h copyauth setkey
52
53 cellconfig.o: cellconfig.c ${INCLS}
54 ktc.o: ktc.c ${INCLS} ${TOP_INCDIR}/afs/vice.h
55 writeconfig.o: writeconfig.c ${INCLS}
56 authcon.o: authcon.c ${INCLS}
57 userok.o: userok.c ${INCLS}
58 cellconfig.o: cellconfig.c ${INCLS}
59 copyauth.o: copyauth.c ${INCLS} AFS_component_version_number.o
60 setkey.o: setkey.c ${INCLS} AFS_component_version_number.o
61
62 ktc.krb.o: ktc.c ${INCLS} ${TOP_INCDIR}/afs/vice.h
63         ${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c ${srcdir}/ktc.c -o ktc.krb.o
64
65 libauth.a: $(OBJS) AFS_component_version_number.o
66         -$(RM) -f libauth.a
67         $(AR) crv $@ $(OBJS) AFS_component_version_number.o
68         $(RANLIB) libauth.a
69
70 libauth.krb.a: $(KOBJS) AFS_component_version_number.o
71         -$(RM) -f $@
72         $(AR) crv $@ $(KOBJS) AFS_component_version_number.o
73         $(RANLIB) $@
74
75 copyauth: copyauth.o
76         $(CC) $(CFLAGS) -o copyauth copyauth.o ${LIBS}
77
78 setkey: setkey.o
79         ${CC} $(CFLAGS) -o setkey setkey.o ${LIBS}
80
81 acfg_errors.o: acfg_errors.c
82
83 acfg_errors.c cellconfig.h: acfg_errors.et cellconfig.p.h
84         $(RM) -f cellconfig.h acfg_errors.c
85         ${COMPILE_ET} -p ${srcdir} acfg_errors -h cellconfig
86
87 ktc_errors.o: ktc_errors.c
88
89 ktc_errors.c auth.h: ktc_errors.et auth.p.h
90         $(RM) -f auth.h ktc_errors.c
91         ${COMPILE_ET} -p ${srcdir} ktc_errors -h auth
92
93 #
94 # Install targets
95 #
96 kinstall: ${KERNELDIR}/afs/auth.h
97
98 ${KERNELDIR}/afs/auth.h: auth.h
99         ${INSTALL} $? $@
100
101 ukinstall: \
102         ${UKERNELDIR}/afs/auth.h \
103         ${UKERNELDIR}/afs/cellconfig.h \
104         ${UKERNELDIR}/afs/acfg_errors.c \
105         ${UKERNELDIR}/afs/keys.h \
106         ${UKERNELDIR}/afs/cellconfig.c \
107         ${UKERNELDIR}/afs/ktc.c \
108         ${UKERNELDIR}/afs/authcon.c \
109         ${UKERNELDIR}/afs/ktc_errors.c
110
111 ${UKERNELDIR}/afs/auth.h: auth.h
112         ${INSTALL} $? $@
113
114 ${UKERNELDIR}/afs/cellconfig.h: cellconfig.h
115         ${INSTALL} $? $@
116
117 ${UKERNELDIR}/afs/cellconfig.c: cellconfig.c
118         ${INSTALL} $? $@
119
120 ${UKERNELDIR}/afs/acfg_errors.c: acfg_errors.c
121         ${INSTALL} $? $@
122
123 ${UKERNELDIR}/afs/keys.h: keys.h
124         ${INSTALL} $? $@
125
126 ${UKERNELDIR}/afs/ktc.c: ktc.c
127         ${INSTALL} $? $@
128
129 ${UKERNELDIR}/afs/authcon.c: authcon.c
130         ${INSTALL} $? $@
131
132 ${UKERNELDIR}/afs/ktc_errors.c: ktc_errors.c
133         ${INSTALL} $? $@
134
135 install:   ${DESTDIR}${libdir}/afs/libauth.a ${DESTDIR}${libdir}/afs/libauth.krb.a ${DESTDIR}${includedir}/afs/keys.h ${DESTDIR}${includedir}/afs/cellconfig.h ${DESTDIR}${includedir}/afs/auth.h ${DESTDIR}${sbindir}/copyauth 
136
137 ${DEST}/lib/afs/libauth.a: libauth.a
138         ${INSTALL} $? $@
139
140 ${DEST}/lib/afs/libauth.krb.a: libauth.krb.a
141         ${INSTALL} $? $@
142
143 ${DEST}/etc/copyauth: copyauth
144         ${INSTALL} $? $@
145
146 ${DEST}/include/afs/keys.h: keys.h
147         ${INSTALL} $? $@
148
149 ${DEST}/include/afs/cellconfig.h: cellconfig.h
150         ${INSTALL} $? $@
151
152 ${DEST}/include/afs/auth.h: auth.h
153         ${INSTALL} $? $@
154
155 #
156 # Misc. targets
157 #
158 test: 
159         cd test; $(MAKE)
160
161 clean:
162         $(RM) -f *.o *.a copyauth setkey auth.h cellconfig.h acfg_errors.c ktc_errors.c core\
163         AFS_component_version_number.c
164
165 include ../config/Makefile.version
166 ${DESTDIR}${libdir}/afs/libauth.a: libauth.a
167         ${INSTALL} $? $@
168
169 ${TOP_LIBDIR}/libauth.a: libauth.a
170         ${INSTALL} $? $@
171
172 ${DESTDIR}${libdir}/afs/libauth.krb.a: libauth.krb.a
173         ${INSTALL} $? $@
174
175 ${TOP_LIBDIR}/libauth.krb.a: libauth.krb.a
176         ${INSTALL} $? $@
177
178 ${DESTDIR}${includedir}/afs/keys.h: keys.h
179         ${INSTALL} $? $@
180
181 ${TOP_INCDIR}/afs/keys.h: keys.h
182         ${INSTALL} $? $@
183
184 ${DESTDIR}${includedir}/afs/cellconfig.h: cellconfig.h
185         ${INSTALL} $? $@
186
187 ${TOP_INCDIR}/afs/cellconfig.h: cellconfig.h
188         ${INSTALL} $? $@
189
190 ${DESTDIR}${includedir}/afs/auth.h: auth.h
191         ${INSTALL} $? $@
192
193 ${TOP_INCDIR}/afs/auth.h: auth.h
194         ${INSTALL} $? $@
195
196 ${DESTDIR}${sbindir}/copyauth: copyauth
197         ${INSTALL} $? $@
198
199 dest:   ${DEST}/lib/afs/libauth.a ${DEST}/lib/afs/libauth.krb.a ${DEST}/include/afs/keys.h ${DEST}/include/afs/cellconfig.h ${DEST}/include/afs/auth.h ${DEST}/etc/copyauth 
200