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