8caf9d5daa73dabb46bfc89cf5585a3956998034
[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=$(DBG) -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
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: ${TOP_LIBDIR}/libauth.a ${TOP_LIBDIR}/libauth.krb.a depinstall copyauth setkey
27
28 depinstall: ${TOP_INCDIR}/afs/keys.h ${TOP_INCDIR}/afs/cellconfig.h ${TOP_INCDIR}/afs/auth.h
29
30 cellconfig.o: cellconfig.c ${INCLS}
31 ktc.o: ktc.c ${INCLS} ${TOP_INCDIR}/afs/vice.h
32 writeconfig.o: writeconfig.c ${INCLS}
33 authcon.o: authcon.c ${INCLS}
34 userok.o: userok.c ${INCLS}
35 cellconfig.o: cellconfig.c ${INCLS}
36 copyauth.o: copyauth.c ${INCLS} AFS_component_version_number.o
37 setkey.o: setkey.c ${INCLS} AFS_component_version_number.o
38
39 ktc.krb.o: ktc.c ${INCLS} ${TOP_INCDIR}/afs/vice.h
40         ${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c ${srcdir}/ktc.c -o ktc.krb.o
41
42 libauth.a: $(OBJS) AFS_component_version_number.o
43         -$(RM) -f libauth.a
44         $(AR) crv $@ $(OBJS) AFS_component_version_number.o
45         $(RANLIB) libauth.a
46
47 libauth.krb.a: $(KOBJS) AFS_component_version_number.o
48         -$(RM) -f $@
49         $(AR) crv $@ $(KOBJS) AFS_component_version_number.o
50         $(RANLIB) $@
51
52 copyauth: copyauth.o ${LIBS}
53         $(CC) $(CFLAGS) -o copyauth copyauth.o ${LIBS} ${XLIBS}
54
55 setkey: setkey.o ${LIBS}
56         ${CC} $(CFLAGS) -o setkey setkey.o ${LIBS} ${XLIBS}
57
58 acfg_errors.o: acfg_errors.c
59
60 acfg_errors.c cellconfig.h: acfg_errors.et cellconfig.p.h
61         $(RM) -f cellconfig.h acfg_errors.c
62         ${COMPILE_ET} -p ${srcdir} acfg_errors -h cellconfig
63
64 ktc_errors.o: ktc_errors.c
65
66 ktc_errors.c auth.h: ktc_errors.et auth.p.h
67         $(RM) -f auth.h ktc_errors.c
68         ${COMPILE_ET} -p ${srcdir} ktc_errors -h auth
69
70 #
71 # Install targets
72 #
73 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 
74
75 ${DEST}/lib/afs/libauth.a: libauth.a
76         ${INSTALL} $? $@
77
78 ${DEST}/lib/afs/libauth.krb.a: libauth.krb.a
79         ${INSTALL} $? $@
80
81 ${DEST}/etc/copyauth: copyauth
82         ${INSTALL} $? $@
83
84 ${DEST}/include/afs/keys.h: keys.h
85         ${INSTALL} $? $@
86
87 ${DEST}/include/afs/cellconfig.h: cellconfig.h
88         ${INSTALL} $? $@
89
90 ${DEST}/include/afs/auth.h: auth.h
91         ${INSTALL} $? $@
92
93 #
94 # Misc. targets
95 #
96 test: 
97         cd test; $(MAKE)
98
99 clean:
100         $(RM) -f *.o *.a copyauth setkey auth.h cellconfig.h acfg_errors.c ktc_errors.c core\
101         AFS_component_version_number.c
102
103 include ../config/Makefile.version
104 ${DESTDIR}${libdir}/afs/libauth.a: libauth.a
105         ${INSTALL} $? $@
106
107 ${TOP_LIBDIR}/libauth.a: libauth.a
108         ${INSTALL} $? $@
109
110 ${DESTDIR}${libdir}/afs/libauth.krb.a: libauth.krb.a
111         ${INSTALL} $? $@
112
113 ${TOP_LIBDIR}/libauth.krb.a: libauth.krb.a
114         ${INSTALL} $? $@
115
116 ${DESTDIR}${includedir}/afs/keys.h: keys.h
117         ${INSTALL} $? $@
118
119 ${TOP_INCDIR}/afs/keys.h: keys.h
120         ${INSTALL} $? $@
121
122 ${DESTDIR}${includedir}/afs/cellconfig.h: cellconfig.h
123         ${INSTALL} $? $@
124
125 ${TOP_INCDIR}/afs/cellconfig.h: cellconfig.h
126         ${INSTALL} $? $@
127
128 ${DESTDIR}${includedir}/afs/auth.h: auth.h
129         ${INSTALL} $? $@
130
131 ${TOP_INCDIR}/afs/auth.h: auth.h
132         ${INSTALL} $? $@
133
134 ${DESTDIR}${sbindir}/copyauth: copyauth
135         ${INSTALL} $? $@
136
137 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 
138