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