death-to-permit-xprt-h-20010327
[openafs.git] / src / rxkad / Makefile
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 # */
9
10
11 SHELL = /bin/sh
12 COMPONENT=rxkad
13 include ../config/Makefile.${SYS_NAME}
14
15 KERNELDIR = ../libafs/
16 UKERNELDIR = ../libuafs/
17 COMPILE_ET = ${SRCDIR}bin/compile_et
18 MKDIR_IF_NEEDED=[ -d $$1 ] || mkdir -p $$1
19
20 CFLAGS = ${OPTMZ} -I${SRCDIR}include ${XCFLAGS}
21 INCLS= ${SRCDIR}include/rx/rx.h \
22        ${SRCDIR}include/rx/xdr.h \
23        rxkad.h
24
25 OBJS= rxkad_client.o rxkad_server.o rxkad_common.o ticket.o rxkad_errs.o
26
27 REGOBJS=fcrypt.o crypt_conn.o
28
29 KSRCS=private_data.h fcrypt.h fcrypt.c crypt_conn.c rxkad_client.c rxkad_common.c rxkad.h sboxes.h
30
31 UKSRCS=$(KSRCS) rxkad.h ticket.c rxkad_server.c lifetimes.h private_data.h rxkad_errs.c
32
33 include ../config/Makefile.version
34
35 noversion: install
36
37 all: librxkad.a
38
39 system: install
40
41 clean: 
42         rm -f *.o tcrypt core *.a rxkad_errs.c rxkad.h AFS_component_version_number.c
43
44 librxkad.a: $(OBJS) ${REGOBJS} AFS_component_version_number.o
45         -rm -f librxkad.a
46         $(AR) rv librxkad.a $(OBJS) ${REGOBJS} AFS_component_version_number.o
47         $(RANLIB) librxkad.a
48
49 crypt_conn.o: fcrypt.h private_data.h crypt_conn.c ${INCLS}
50
51 rxkad_client.o: fcrypt.h private_data.h rxkad_client.c ${INCLS}
52
53 rxkad_server.o: fcrypt.h private_data.h rxkad_server.c ${INCLS}
54
55 rxkad_common.o: fcrypt.h private_data.h rxkad_common.c ${INCLS}
56
57 rxkad_errs.o: rxkad_errs.c
58
59 rxkad_errs.c rxkad.h: rxkad_errs.et rxkad.p.h
60         rm -f rxkad.h rxkad_errs.c; ${COMPILE_ET} rxkad_errs -h rxkad
61
62 ticket.o: ticket.c lifetimes.h ${INCLS}
63
64 fcrypt.o: fcrypt.c fcrypt.h sboxes.h rxkad.h
65         ${CC} ${CFLAGS} -c fcrypt.c
66
67 kinstall: ${KSRCS}
68         ${INSTALL} $(KSRCS) ${KERNELDIR}afs
69
70 ukinstall webinstall: ${UKSRCS}
71         set ${UKERNELDIR}afs; $(MKDIR_IF_NEEDED)
72         set ${UKERNELDIR}rx; $(MKDIR_IF_NEEDED)
73         ${INSTALL} $(UKSRCS) ${UKERNELDIR}afs
74         ${INSTALL} rxkad.h ${UKERNELDIR}rx
75
76 install: all kinstall ukinstall
77         rm -f ${DESTDIR}lib/librxkad.a
78         ${INSTALL} librxkad.a ${DESTDIR}lib
79         ${INSTALL} rxkad.h ${DESTDIR}include/rx
80
81 tcrypt: tcrypt.o librxkad.a 
82         ${CC} -o tcrypt tcrypt.o librxkad.a
83 tcrypt.o: tcrypt.c AFS_component_version_number.o
84
85 test:
86         cd test; $(MAKE)
87
88 # These sources are kept in a separate directory so that we can use an
89 # ACL to comply with source export restrictions.
90
91 crypt_conn.c:   domestic/crypt_conn.c
92         rm -f $@
93         cp domestic/crypt_conn.c $@
94
95 fcrypt.c:       domestic/fcrypt.c
96         rm -f $@
97         cp domestic/fcrypt.c $@
98
99 fcrypt.h:       domestic/fcrypt.h
100         rm -f $@
101         cp domestic/fcrypt.h $@
102
103 sboxes.h:       domestic/sboxes.h
104         rm -f $@
105         cp domestic/sboxes.h $@
106
107 tcrypt.c:       domestic/tcrypt.c
108         rm -f $@
109         cp domestic/tcrypt.c $@