rxkad-new-fcrypt-20021028
[openafs.git] / src / rxkad / 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 CFLAGS=-I. -I${srcdir} ${OPTMZ} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
12 INCLS=${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \
13         ${TOP_INCDIR}/rx/fcrypt.h \
14         rxkad.h rxkad_prototypes.h fcrypt.h v5gen.h
15
16 OBJS=rxkad_client.o rxkad_server.o rxkad_common.o rxkad_errs.o \
17         bg-fcrypt.o ticket.o ticket5.o crc.o
18
19 fc_test_OBJS=fc_test.o
20
21 fc_test_LIBS=\
22         ${TOP_LIBDIR}/librxkad.a \
23         ${TOP_LIBDIR}/librx.a \
24         ${TOP_LIBDIR}/liblwp.a \
25         ${TOP_LIBDIR}/libsys.a
26
27 all: ${TOP_LIBDIR}/librxkad.a fc_test depinstall
28
29 depinstall: \
30         ${TOP_INCDIR}/rx/rxkad.h \
31         ${TOP_INCDIR}/rx/rxkad_prototypes.h \
32         ${TOP_INCDIR}/rx/fcrypt.h
33
34 #
35 # Install targets
36 #
37 install:   \
38         ${DESTDIR}${libdir}/librxkad.a \
39         ${DESTDIR}${includedir}/rx/fcrypt.h \
40         ${DESTDIR}${includedir}/rx/rxkad.h \
41         ${DESTDIR}${includedir}/rx/rxkad_prototypes.h
42
43 ${DEST}/lib/librxkad.a: librxkad.a
44         ${INSTALL} $? $@
45
46 ${DEST}/include/rx/fcrypt.h: fcrypt.h
47         ${INSTALL} $? $@
48
49 ${DEST}/include/rx/rxkad.h: rxkad.h
50         ${INSTALL} $? $@
51
52 ${DEST}/include/rx/rxkad_prototypes.h: rxkad_prototypes.h
53         ${INSTALL} $? $@
54
55 #
56 # Build targets
57 #
58
59 librxkad.a: ${OBJS} AFS_component_version_number.o
60         -$(RM) -f $@
61         $(AR) crv $@ ${OBJS} AFS_component_version_number.o
62         $(RANLIB) $@
63
64 rxkad_client.o: fcrypt.h private_data.h rxkad_client.c ${INCLS}
65
66 rxkad_server.o: fcrypt.h private_data.h rxkad_server.c ${INCLS}
67
68 rxkad_common.o: fcrypt.h private_data.h rxkad_common.c ${INCLS}
69
70 rxkad_errs.o: rxkad_errs.c
71
72 rxkad_errs.c rxkad.h: rxkad_errs.et rxkad.p.h
73         $(RM) -f rxkad.h rxkad_errs.c
74         ${COMPILE_ET} -p ${srcdir} rxkad_errs -h rxkad
75
76 ticket.o: ticket.c lifetimes.h ${INCLS}
77
78 ticket5.o: ticket5.c v5gen.c v5der.c v5gen-rewrite.h ${INCLS}
79
80 crc.o: crc.c ${INCLS}
81
82 bg-fcrypt.o: bg-fcrypt.c fcrypt.h rxkad.h rxkad_prototypes.h
83         ${CC} ${CFLAGS} -c bg-fcrypt.c
84
85 tcrypt: tcrypt.o librxkad.a 
86         ${CC} -o tcrypt tcrypt.o librxkad.a
87
88 tcrypt.o: tcrypt.c AFS_component_version_number.o
89
90 fc_test: ${fc_test_OBJS}
91         ${CC} ${CFLAGS} -o fc_test ${fc_test_OBJS} ${fc_test_LIBS} ${XLIBS}
92
93 fc_test.o: ${INCLS}
94
95 #
96 # Misc. targets
97 #
98
99 clean: 
100         $(RM) -f *.o *.a tcrypt core rxkad_errs.c rxkad.h \
101                 AFS_component_version_number.c \
102                 fcrypt.h sboxes.h \
103                 fc_test
104
105 test:
106         cd test; $(MAKE)
107
108 # These sources are kept in a separate directory so that we can use an
109 # ACL to comply with source export restrictions.
110
111 fcrypt.h: domestic/fcrypt.h
112         ${INSTALL} $? $@
113
114 tcrypt.c: domestic/tcrypt.c
115         ${INSTALL} $? $@
116
117 include ../config/Makefile.version
118 ${DESTDIR}${libdir}/librxkad.a: librxkad.a
119         ${INSTALL} $? $@
120
121 ${TOP_LIBDIR}/librxkad.a: librxkad.a
122         ${INSTALL} $? $@
123
124 ${DESTDIR}${includedir}/rx/fcrypt.h: fcrypt.h
125         ${INSTALL} $? $@
126
127 ${DESTDIR}${includedir}/rx/rxkad.h: rxkad.h
128         ${INSTALL} $? $@
129
130 ${DESTDIR}${includedir}/rx/rxkad_prototypes.h: rxkad_prototypes.h
131         ${INSTALL} $? $@
132
133 ${TOP_INCDIR}/rx/fcrypt.h: fcrypt.h
134         ${INSTALL} $? $@
135
136 ${TOP_INCDIR}/rx/rxkad.h: rxkad.h
137         ${INSTALL} $? $@
138
139 ${TOP_INCDIR}/rx/rxkad_prototypes.h: rxkad_prototypes.h
140         ${INSTALL} $? $@
141
142 dest:   \
143         ${DEST}/lib/librxkad.a \
144         ${DEST}/include/rx/fcrypt.h \
145         ${DEST}/include/rx/rxkad.h \
146         ${DEST}/include/rx/rxkad_prototypes.h
147