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