1 # Copyright 2000, International Business Machines Corporation and others.
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
10 include ../config/Makefile.${SYS_NAME}
12 UKERNELDIR=../libuafs/
13 INSTALL=${SRCDIR}bin/install
14 RXGEN=${SRCDIR}bin/rxgen
15 COMPILE_ET = ${SRCDIR}bin/compile_et
16 MKDIR_IF_NEEDED=[ -d $$1 ] || mkdir -p $$1
18 CFLAGS = $(DBUG) -I${SRCDIR}include ${XCFLAGS}
20 INCLS=${SRCDIR}include/ubik.h \
21 ${SRCDIR}include/lock.h \
22 ${SRCDIR}include/lwp.h \
23 ${SRCDIR}include/rx/rx.h \
24 ${SRCDIR}include/rx/xdr.h \
25 ${SRCDIR}include/afs/keys.h \
26 ${SRCDIR}include/afs/cellconfig.h \
27 ptserver.h ptclient.h ptint.h ptopcodes.h pterror.h
29 LINCLS=${SRCDIR}include/ubik.h \
30 ${SRCDIR}include/lock.h \
31 ${SRCDIR}include/rx/rx.h \
32 ${SRCDIR}include/rx/xdr.h \
33 ${SRCDIR}include/rx/rxkad.h \
34 ${SRCDIR}include/afs/auth.h \
35 ${SRCDIR}include/afs/cellconfig.h \
36 ptclient.h ptint.h pterror.h
38 LIBS = ${SRCDIR}lib/libubik.a \
39 ${SRCDIR}lib/afs/libauth.a \
40 ${SRCDIR}lib/librxkad.a \
41 ${SRCDIR}lib/librxstat.a \
42 ${SRCDIR}lib/librx.a \
43 ${SRCDIR}lib/liblwp.a \
44 ${SRCDIR}lib/libdes.a \
45 ${SRCDIR}lib/afs/libcom_err.a \
46 ${SRCDIR}lib/afs/util.a \
47 ${SRCDIR}lib/afs/libsys.a
49 auditlib=${SRCDIR}lib/afs/libaudit.a
51 LIBOBJS=ptuser.o pterror.o ptint.cs.o ptint.xdr.o
53 UKSRCS=ptuser.c ptclient.h pterror.c pterror.h ptserver.h
55 include ../config/Makefile.version
59 $(RM) -f *.o ptserver ptint.cs.c ptint.ss.c ptclient ptint.xdr.c ptint.h \
60 libprot.a pts readgroup readpwd db_verify testpt pterror.h pterror.c \
61 core AFS_component_version_number.c
63 ptserver: ptserver.o ptutils.o ptprocs.o ptint.ss.o ptint.xdr.o utils.o $(LIBS) ${auditlib}
64 $(CC) ${CFLAGS} -o ptserver ptserver.o ptutils.o ptprocs.o ptint.ss.o ptint.xdr.o utils.o $(LIBS) ${XLIBS} ${auditlib}
66 ptserver.o: ptserver.c ${INCLS} AFS_component_version_number.c
68 ptutils.o: ptutils.c ${INCLS}
70 ptprocs.o: ptprocs.c ${INCLS}
72 utils.o: utils.c ${INCLS}
74 ptint.ss.o: ptint.ss.c ptint.xdr.c ptint.xg
75 ptint.cs.o: ptint.cs.c ptint.xdr.c ptint.xg
76 ptint.xdr.o: ptint.xdr.c ptint.h ptint.xg
78 ptint.ss.c ptint.cs.c ptint.xdr.c ptint.h: ptint.xg
81 Kptint.cs.c: ptint.xg Kptint.h
82 ${RXGEN} -x -k -C -o Kptint.cs.c ptint.xg
84 Kptint.xdr.c: ptint.xg
85 ${RXGEN} -x -k -c -o Kptint.xdr.c ptint.xg
88 ${RXGEN} -x -k -h -o Kptint.h ptint.xg
90 display.o: display.c ${INCLS}
92 db_verify.o: db_verify.c ${INCLS} AFS_component_version_number.c
94 db_verify: db_verify.o pterror.o display.o $(LIBS)
95 $(CC) ${CFLAGS} -o db_verify db_verify.o display.o pterror.o $(LIBS) ${XLIBS} ${SRCDIR}lib/afs/libcmd.a
97 ptclient: ptclient.o display.o libprot.a $(LIBS)
98 $(CC) ${CFLAGS} -o ptclient ptclient.o display.o libprot.a $(LIBS) ${XLIBS}
100 ptclient.o: ptclient.c ${INCLS} AFS_component_version_number.c
102 ptuser.o: ptuser.c ${LINCLS} ${PE}
104 pterror.h pterror.c: pterror.et
105 $(RM) -f pterror.h pterror.c; ${COMPILE_ET} pterror
107 libprot.a: ${LIBOBJS} AFS_component_version_number.o
109 $(AR) r libprot.a ${LIBOBJS} AFS_component_version_number.o
113 pts: pts.o libprot.a ${SRCDIR}lib/afs/libcmd.a $(LIBS)
114 $(CC) ${CFLAGS} -o pts pts.o ${SRCDIR}lib/afs/libcmd.a libprot.a ${LIBS} ${XLIBS}
116 pts.o: pts.c ${LINCLS} ${SRCDIR}include/afs/cmd.h AFS_component_version_number.c
118 readgroup: readgroup.o libprot.a $(LIBS)
119 $(CC) ${CFLAGS} -o readgroup readgroup.o libprot.a ${LIBS} ${XLIBS}
121 readgroup.o: readgroup.c ${LINCLS} AFS_component_version_number.c
123 readpwd: readpwd.o libprot.a $(LIBS)
124 $(CC) ${CFLAGS} -o readpwd readpwd.o libprot.a ${LIBS} ${XLIBS}
126 readpwd.o: readpwd.c ${LINCLS} AFS_component_version_number.c
128 testpt: testpt.o libprot.a ${SRCDIR}lib/afs/libcmd.a $(LIBS)
129 $(CC) ${CFLAGS} -o testpt testpt.o -lm ${SRCDIR}lib/afs/libcmd.a libprot.a $(LIBS) ${XLIBS}
131 testpt.o: testpt.c ${INCLS} ${SRCDIR}include/afs/cmd.h AFS_component_version_number.c
137 @echo No $@ source here.
139 ukinstall webinstall: ${UKSRCS} Kptint.h Kptint.cs.c Kptint.xdr.c
140 set ${UKERNELDIR}afs; $(MKDIR_IF_NEEDED)
141 ${INSTALL} Kptint.h ${UKERNELDIR}afsint/ptint.h
142 ${INSTALL} Kptint.cs.c ${UKERNELDIR}afsint/ptint.cs.c
143 ${INSTALL} Kptint.xdr.c ${UKERNELDIR}afsint/ptint.xdr.c
144 ${INSTALL} ${UKSRCS} ${UKERNELDIR}afs
146 all: ptclient libprot.a pts db_verify readgroup readpwd testpt
148 ${DESTDIR}root.server/usr/afs/bin/ptserver: ptserver
151 ${DESTDIR}bin/pts ${DESTDIR}root.server/usr/afs/bin/pts: pts
154 ${DESTDIR}lib/afs/libprot.a: libprot.a
158 install: all ukinstall ${DESTDIR}root.server/usr/afs/bin/ptserver ${DESTDIR}root.server/usr/afs/bin/pts ${DESTDIR}bin/pts ${DESTDIR}lib/afs/libprot.a
159 ${INSTALL} libprot.a ${DESTDIR}lib/afs/libprot.a
160 ${INSTALL} ptserver.h ptint.h pterror.h ptclient.h ${DESTDIR}include/afs
161 ${INSTALL} ptserver.h ${DESTDIR}include/afs/prserver.h
162 ${INSTALL} ptint.h ${DESTDIR}include/afs/print.h
163 ${INSTALL} pterror.h ${DESTDIR}include/afs/prerror.h
164 ${INSTALL} ptclient.h ${DESTDIR}include/afs/prclient.h
165 ${INSTALL} -f db_verify ${DESTDIR}etc/prdb_check
166 echo '#define ERROR_TABLE_BASE_pr ERROR_TABLE_BASE_pt' >> ${DESTDIR}include/afs/prerror.h