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