7747943dfac7321a8f011c7e42826d95addf1e48
[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 srcdir=@srcdir@
9 include @TOP_OBJDIR@/src/config/Makefile.config
10 include @TOP_OBJDIR@/src/config/Makefile.lwp
11
12 INSTALL = @INSTALL@
13 INSTALL_DATA = @INSTALL_DATA@
14 INSTALL_PROGRAM = @INSTALL_PROGRAM@
15 INSTALL_SCRIPT = @INSTALL_SCRIPT@
16
17 OBJS= cellconfig.o keys.o ktc.o userok.o writeconfig.o authcon.o \
18     acfg_errors.o ktc_errors.o token.xdr.o token.o
19 KOBJS= cellconfig.o keys.o ktc.krb.o userok.o writeconfig.o authcon.o \
20     acfg_errors.o ktc_errors.o token.xdr.o token.o
21
22 LIBS=libauth.a \
23       ${TOP_LIBDIR}/librxkad.a \
24       ${TOP_LIBDIR}/librx.a \
25       ${TOP_LIBDIR}/libsys.a \
26       ${TOP_LIBDIR}/liblwp.a \
27       ${TOP_LIBDIR}/util.a
28
29 INCLS=cellconfig.h auth.h keys.h internal.h
30 KSRCS=auth.h
31 UKSRCS=${KSRCS} cellconfig.h acfg_errors.c keys.h cellconfig.c \
32        ktc.c authcon.c ktc_errors.c
33
34 all: ${TOP_LIBDIR}/libauth.a ${TOP_LIBDIR}/libauth.krb.a depinstall
35
36 depinstall: ${TOP_INCDIR}/afs/keys.h \
37         ${TOP_INCDIR}/afs/cellconfig.h \
38         ${TOP_INCDIR}/afs/auth.h \
39         ${TOP_INCDIR}/afs/ktc.h \
40         ${TOP_INCDIR}/afs/token.h \
41         token.h \
42         Ktoken.xdr.c \
43         token.xdr.c
44
45 ${TOP_INCDIR}/afs/token.h: token.h
46         ${INSTALL_DATA} $? $@
47
48 generated: acfg_errors.c cellconfig.h ktc_errors.c auth.h
49
50 ${TOP_INCDIR}/afs/keys.h: keys.h
51         ${INSTALL_DATA} $? $@
52
53 ${TOP_INCDIR}/afs/cellconfig.h: cellconfig.h
54         ${INSTALL_DATA} cellconfig.h $@
55
56 ${TOP_INCDIR}/afs/auth.h: auth.h
57         ${INSTALL_DATA} $? $@
58
59 ${TOP_INCDIR}/afs/ktc.h: ktc.h
60         ${INSTALL_DATA} $? $@
61
62 ${TOP_LIBDIR}/libauth.a: libauth.a
63         ${INSTALL_DATA} libauth.a $@
64
65 ${TOP_LIBDIR}/libauth.krb.a: libauth.krb.a
66         ${INSTALL_DATA} libauth.krb.a $@
67
68 cellconfig.o: cellconfig.c ${INCLS}
69 keys.o: keys.c ${INCLS}
70 ktc.o: ktc.c ${INCLS} ${TOP_INCDIR}/afs/vice.h
71 writeconfig.o: writeconfig.c ${INCLS}
72 authcon.o: authcon.c ${INCLS}
73 userok.o: userok.c ${INCLS}
74 cellconfig.o: cellconfig.c ${INCLS}
75 copyauth.o: copyauth.c ${INCLS} AFS_component_version_number.o
76 setkey.o: setkey.c ${INCLS} AFS_component_version_number.o
77
78 CFLAGS_ktc.krb.o = -DAFS_KERBEROS_ENV
79 ktc.krb.o: ktc.c ${INCLS} ${TOP_INCDIR}/afs/vice.h
80         $(AFS_CCRULE) $(srcdir)/ktc.c
81
82 libauth.a: $(OBJS) AFS_component_version_number.o
83         -$(RM) -f libauth.a
84         $(AR) crv $@ $(OBJS) AFS_component_version_number.o
85         $(RANLIB) libauth.a
86
87 libauth.krb.a: $(KOBJS) AFS_component_version_number.o
88         -$(RM) -f $@
89         $(AR) crv $@ $(KOBJS) AFS_component_version_number.o
90         $(RANLIB) $@
91
92 copyauth: copyauth.o ${LIBS}
93         $(AFS_LDRULE) copyauth.o ${LIBS} ${XLIBS}
94
95 setkey: setkey.o ${LIBS}
96         $(AFS_LDRULE) setkey.o ${LIBS} ${XLIBS}
97
98 acfg_errors.c cellconfig.h: acfg_errors.et cellconfig.p.h
99         $(RM) -f cellconfig.h acfg_errors.c
100         ${COMPILE_ET} -p ${srcdir} acfg_errors -h cellconfig
101
102 ktc.o: token.h
103
104 ktc_errors.c auth.h: ktc_errors.et auth.p.h
105         $(RM) -f auth.h ktc_errors.c
106         ${COMPILE_ET} -p ${srcdir} ktc_errors -h auth
107
108 Ktoken.xdr.c: token.xg
109         $(RXGEN) -A -x -k -c -o $@ $(srcdir)/token.xg
110
111 token.xdr.c: token.xg
112         $(RXGEN) -A -x -c -o $@ ${srcdir}/token.xg
113
114 token.h : token.xg
115         $(RXGEN) -A -x -h -o $@ ${srcdir}/token.xg
116
117 #
118 # Install targets
119 #
120 install: libauth.a libauth.krb.a auth.h cellconfig.h
121         ${INSTALL} -d ${DESTDIR}${libdir}/afs
122         ${INSTALL} -d ${DESTDIR}${includedir}/afs
123         ${INSTALL_DATA} libauth.a ${DESTDIR}${libdir}/afs/libauth.a
124         ${INSTALL_DATA} libauth.krb.a ${DESTDIR}${libdir}/afs/libauth.krb.a
125         ${INSTALL_DATA} ${srcdir}/keys.h ${DESTDIR}${includedir}/afs/keys.h
126         ${INSTALL_DATA} cellconfig.h ${DESTDIR}${includedir}/afs/cellconfig.h
127         ${INSTALL_DATA} auth.h ${DESTDIR}${includedir}/afs/auth.h
128         ${INSTALL_DATA} ${srcdir}/ktc.h ${DESTDIR}${includedir}/afs/ktc.h
129
130 dest: libauth.a libauth.krb.a auth.h cellconfig.h
131         ${INSTALL} -d ${DEST}/lib/afs
132         ${INSTALL} -d ${DEST}/include/afs
133         ${INSTALL_DATA} libauth.a ${DEST}/lib/afs/libauth.a
134         ${INSTALL_DATA} libauth.krb.a ${DEST}/lib/afs/libauth.krb.a
135         ${INSTALL_DATA} ${srcdir}/keys.h ${DEST}/include/afs/keys.h
136         ${INSTALL_DATA} cellconfig.h ${DEST}/include/afs/cellconfig.h
137         ${INSTALL_DATA} auth.h ${DEST}/include/afs/auth.h
138         ${INSTALL_DATA} ${srcdir}/ktc.h ${DEST}/include/afs/ktc.h
139
140 #
141 # Misc. targets
142 #
143 test: 
144         cd test; $(MAKE)
145
146 clean:
147         $(RM) -f *.o *.a copyauth setkey auth.h cellconfig.h acfg_errors.c \
148                 ktc_errors.c token.h token.xdr.c core Ktoken.xdr.c \
149                 AFS_component_version_number.c
150
151 include ../config/Makefile.version