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