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