afs-superuser-foreign-realm-checks-20010514
[openafs.git] / src / auth / 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 SHELL = /bin/sh
9 COMPONENT=auth
10
11 include ../config/Makefile.${SYS_NAME}
12
13 KERNELDIR = ../libafs/
14 UKERNELDIR = ../libuafs/
15 COMPILE_ET = ${SRCDIR}bin/compile_et
16 OBJS= cellconfig.o ktc.o userok.o writeconfig.o authcon.o \
17     acfg_errors.o ktc_errors.o # comktc.o comvice.o comauth.o 
18 KOBJS= cellconfig.o ktc.krb.o userok.o writeconfig.o authcon.o \
19     acfg_errors.o ktc_errors.o # comktc.o comvice.o comauth.o 
20
21 CFLAGS=-g -I${SRCDIR}include ${XCFLAGS} 
22 LDIRS= 
23 LIBS= libauth.a ${DESTDIR}lib/afs/libsys.a \
24       ${DESTDIR}lib/librxkad.a ${DESTDIR}lib/libdes.a \
25       ${DESTDIR}lib/librx.a ${DESTDIR}lib/afs/libsys.a \
26       ${DESTDIR}lib/liblwp.a ${SRCDIR}lib/afs/util.a ${XLIBS}
27 INCLS=cellconfig.h auth.h keys.h # comauth.h
28 KSRCS=auth.h
29 UKSRCS=${KSRCS} cellconfig.h acfg_errors.c keys.h cellconfig.c \
30        ktc.c authcon.c ktc_errors.c
31
32 include ../config/Makefile.version
33
34 system install noversion: install.noversion
35
36 all: libauth.a libauth.krb.a setkey
37
38 cellconfig.o: cellconfig.c ${INCLS}
39 #comktc.o: comktc.c ${INCLS} ${SRCDIR}include/afs/vice.h
40 #comvice.o: comvice.c ${INCLS}
41 writeconfig.o: writeconfig.c ${INCLS}
42 authcon.o: authcon.c ${INCLS}
43 userok.o: userok.c ${INCLS}
44 cellconfig.o: cellconfig.c ${INCLS}
45 copyauth.o: copyauth.c ${INCLS} AFS_component_version_number.o
46 setkey.o: setkey.c ${INCLS} AFS_component_version_number.o
47 #comauth.o: comauth.c ${INCLS} ${SRCDIR}include/afs/vice.h
48
49 ktc.krb.o: ktc.c ${INCLS} ${SRCDIR}include/afs/vice.h
50         ${CC} ${CFLAGS} -DMAYBE_NO_KTC -DAFS_KERBEROS_ENV -c ktc.c -o ktc.krb.o
51
52 ktc.o: ktc.c ${INCLS} ${SRCDIR}include/afs/vice.h
53         ${CC} ${CFLAGS} -DMAYBE_NO_KTC -c ktc.c
54 # : ${SRCDIR}include/afs/ktc.h
55 #       ${CC} ${CFLAGS} -c ktc.c
56
57 libauth.a: $(OBJS) AFS_component_version_number.o
58         -rm -f libauth.a
59         ar rv libauth.a $(OBJS) AFS_component_version_number.o
60         $(RANLIB) libauth.a
61
62 libauth.krb.a: $(KOBJS) AFS_component_version_number.o
63         -rm -f libauth.krb.a
64         ar rv libauth.krb.a $(KOBJS) AFS_component_version_number.o
65         $(RANLIB) libauth.krb.a
66
67 copyauth: copyauth.o
68         $(CC) $(CFLAGS) $(LDIRS) -o copyauth copyauth.o ${LIBS}
69
70 setkey: setkey.o
71         ${CC} $(CFLAGS) $(LDIRS) -o setkey setkey.o ${LIBS}
72
73 acfg_errors.o: acfg_errors.c
74
75 acfg_errors.c cellconfig.h: acfg_errors.et cellconfig.p.h
76         rm -f cellconfig.h acfg_errors.c; ${COMPILE_ET} acfg_errors -h cellconfig
77
78 ktc_errors.o: ktc_errors.c
79
80 ktc_errors.c auth.h: ktc_errors.et auth.p.h
81         rm -f auth.h ktc_errors.c; ${COMPILE_ET} ktc_errors -h auth
82
83 test: 
84         cd test; $(MAKE)
85
86 kinstall: ${KSRCS}
87         ${INSTALL} ${KSRCS} ${KERNELDIR}afs
88
89 ukinstall webinstall: ${UKSRCS}
90         ${INSTALL} ${UKSRCS} ${UKERNELDIR}afs
91
92 ${DESTDIR}etc/copyauth: copyauth
93         ${INSTALL} copyauth ${DESTDIR}etc/copyauth
94
95 install.noversion: all kinstall ukinstall ${DESTDIR}etc/copyauth
96         ${INSTALL} libauth.a ${DESTDIR}lib/afs/libauth.a
97         ${INSTALL} libauth.krb.a ${DESTDIR}lib/afs/libauth.krb.a
98         ${INSTALL} auth.h ${DESTDIR}include/afs
99 #       ${INSTALL} comauth.h ${DESTDIR}include/afs
100         ${INSTALL} cellconfig.h ${DESTDIR}include/afs
101         ${INSTALL} keys.h ${DESTDIR}include/afs
102
103 includes: auth.h cellconfig.h keys.h
104         ${INSTALL} auth.h ${DESTDIR}include/afs
105         ${INSTALL} cellconfig.h ${DESTDIR}include/afs
106         ${INSTALL} keys.h ${DESTDIR}include/afs
107
108 clean:
109         rm -f *.o *.a copyauth testcellconf setkey auth.h cellconfig.h acfg_errors.c ktc_errors.c core\
110         AFS_component_version_number.c