makefile-updates-20010828
[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 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 KERNELDIR = ../libafs/
18 UKERNELDIR = ../libuafs/
19 COMPILE_ET = ${SRCDIR}/bin/compile_et
20 OBJS= cellconfig.o ktc.o userok.o writeconfig.o authcon.o \
21     acfg_errors.o ktc_errors.o
22 KOBJS= cellconfig.o ktc.krb.o userok.o writeconfig.o authcon.o \
23     acfg_errors.o ktc_errors.o
24
25 CFLAGS=-g -I${TOP_SRCDIR}/config -I${SRCDIR}/include ${XCFLAGS} 
26 LIBS= libauth.a ${DESTDIR}/lib/afs/libsys.a \
27       ${DESTDIR}/lib/librxkad.a ${DESTDIR}/lib/libdes.a \
28       ${DESTDIR}/lib/librx.a ${DESTDIR}/lib/afs/libsys.a \
29       ${DESTDIR}/lib/liblwp.a ${SRCDIR}/lib/afs/util.a ${XLIBS}
30 INCLS=cellconfig.h auth.h keys.h
31 KSRCS=auth.h
32 UKSRCS=${KSRCS} cellconfig.h acfg_errors.c keys.h cellconfig.c \
33        ktc.c authcon.c ktc_errors.c
34
35 all: install
36
37 cellconfig.o: cellconfig.c ${INCLS}
38 ktc.o: ktc.c ${INCLS} ${SRCDIR}/include/afs/vice.h
39 writeconfig.o: writeconfig.c ${INCLS}
40 authcon.o: authcon.c ${INCLS}
41 userok.o: userok.c ${INCLS}
42 cellconfig.o: cellconfig.c ${INCLS}
43 copyauth.o: copyauth.c ${INCLS} AFS_component_version_number.o
44 setkey.o: setkey.c ${INCLS} AFS_component_version_number.o
45
46 ktc.krb.o: ktc.c ${INCLS} ${SRCDIR}/include/afs/vice.h
47         ${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c ktc.c -o ktc.krb.o
48
49 libauth.a: $(OBJS) AFS_component_version_number.o
50         -rm -f libauth.a
51         ar rv libauth.a $(OBJS) AFS_component_version_number.o
52         $(RANLIB) libauth.a
53
54 libauth.krb.a: $(KOBJS) AFS_component_version_number.o
55         -rm -f libauth.krb.a
56         ar rv libauth.krb.a $(KOBJS) AFS_component_version_number.o
57         $(RANLIB) libauth.krb.a
58
59 copyauth: copyauth.o
60         $(CC) $(CFLAGS) -o copyauth copyauth.o ${LIBS}
61
62 setkey: setkey.o
63         ${CC} $(CFLAGS) -o setkey setkey.o ${LIBS}
64
65 acfg_errors.o: acfg_errors.c
66
67 acfg_errors.c cellconfig.h: acfg_errors.et cellconfig.p.h
68         rm -f cellconfig.h acfg_errors.c; ${COMPILE_ET} acfg_errors -h cellconfig
69
70 ktc_errors.o: ktc_errors.c
71
72 ktc_errors.c auth.h: ktc_errors.et auth.p.h
73         rm -f auth.h ktc_errors.c; ${COMPILE_ET} ktc_errors -h auth
74
75 #
76 # Install targets
77 #
78 kinstall: ${KERNELDIR}/afs/auth.h
79
80 ${KERNELDIR}/afs/auth.h: auth.h
81         ${INSTALL} $? $@
82
83 ukinstall: \
84         ${UKERNELDIR}/afs/auth.h \
85         ${UKERNELDIR}/afs/cellconfig.h \
86         ${UKERNELDIR}/afs/acfg_errors.c \
87         ${UKERNELDIR}/afs/keys.h \
88         ${UKERNELDIR}/afs/cellconfig.c \
89         ${UKERNELDIR}/afs/ktc.c \
90         ${UKERNELDIR}/afs/authcon.c \
91         ${UKERNELDIR}/afs/ktc_errors.c
92
93 ${UKERNELDIR}/afs/auth.h: auth.h
94         ${INSTALL} $? $@
95
96 ${UKERNELDIR}/afs/cellconfig.h: cellconfig.h
97         ${INSTALL} $? $@
98
99 ${UKERNELDIR}/afs/cellconfig.c: cellconfig.c
100         ${INSTALL} $? $@
101
102 ${UKERNELDIR}/afs/acfg_errors.c: acfg_errors.c
103         ${INSTALL} $? $@
104
105 ${UKERNELDIR}/afs/keys.h: keys.h
106         ${INSTALL} $? $@
107
108 ${UKERNELDIR}/afs/ktc.c: ktc.c
109         ${INSTALL} $? $@
110
111 ${UKERNELDIR}/afs/authcon.c: authcon.c
112         ${INSTALL} $? $@
113
114 ${UKERNELDIR}/afs/ktc_errors.c: ktc_errors.c
115         ${INSTALL} $? $@
116
117 install: kinstall ukinstall \
118         ${DESTDIR}/lib/afs/libauth.a \
119         ${DESTDIR}/lib/afs/libauth.krb.a \
120         ${DESTDIR}/include/afs/keys.h \
121         ${DESTDIR}/include/afs/cellconfig.h \
122         ${DESTDIR}/include/afs/auth.h \
123         ${DESTDIR}/etc/copyauth \
124         setkey
125
126 ${DESTDIR}/lib/afs/libauth.a: libauth.a
127         ${INSTALL} $? $@
128
129 ${DESTDIR}/lib/afs/libauth.krb.a: libauth.krb.a
130         ${INSTALL} $? $@
131
132 ${DESTDIR}/etc/copyauth: copyauth
133         ${INSTALL} $? $@
134
135 ${DESTDIR}/include/afs/keys.h: keys.h
136         ${INSTALL} $? $@
137
138 ${DESTDIR}/include/afs/cellconfig.h: cellconfig.h
139         ${INSTALL} $? $@
140
141 ${DESTDIR}/include/afs/auth.h: auth.h
142         ${INSTALL} $? $@
143
144 #
145 # Misc. targets
146 #
147 test: 
148         cd test; $(MAKE)
149
150 clean:
151         rm -f *.o *.a copyauth setkey auth.h cellconfig.h acfg_errors.c ktc_errors.c core\
152         AFS_component_version_number.c
153
154 include ../config/Makefile.version