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