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
8 include @TOP_OBJDIR@/src/config/Makefile.config
10 CFLAGS=-I. -I${srcdir} $(DBUG) -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
11 INCLS=${TOP_INCDIR}/ubik.h \
12 ${TOP_INCDIR}/lock.h \
14 ${TOP_INCDIR}/rx/rx.h \
15 ${TOP_INCDIR}/rx/xdr.h \
16 ${TOP_INCDIR}/afs/keys.h \
17 ${TOP_INCDIR}/afs/cellconfig.h \
18 ptserver.h ptclient.h ptint.h ptopcodes.h pterror.h
20 LINCLS=${TOP_INCDIR}/ubik.h \
21 ${TOP_INCDIR}/lock.h \
22 ${TOP_INCDIR}/rx/rx.h \
23 ${TOP_INCDIR}/rx/xdr.h \
24 ${TOP_INCDIR}/rx/rxkad.h \
25 ${TOP_INCDIR}/afs/auth.h \
26 ${TOP_INCDIR}/afs/cellconfig.h \
27 ptclient.h ptint.h pterror.h
29 LIBS=${TOP_LIBDIR}/libubik.a \
30 ${TOP_LIBDIR}/libauth.a \
31 ${TOP_LIBDIR}/librxkad.a \
32 ${TOP_LIBDIR}/librxstat.a \
33 ${TOP_LIBDIR}/librx.a \
34 ${TOP_LIBDIR}/liblwp.a \
35 ${TOP_LIBDIR}/libdes.a \
36 ${TOP_LIBDIR}/libcom_err.a \
37 ${TOP_LIBDIR}/util.a \
38 ${TOP_LIBDIR}/libsys.a
41 all: ptserver pts pt_util db_verify ${TOP_LIBDIR}/libprot.a \
42 depinstall readgroup readpwd testpt
45 ptint.cs.c ptint.xdr.c \
46 ${TOP_INCDIR}/afs/prclient.h \
47 ${TOP_INCDIR}/afs/prerror.h \
48 ${TOP_INCDIR}/afs/print.h \
49 ${TOP_INCDIR}/afs/prserver.h \
50 ${TOP_INCDIR}/afs/ptclient.h \
51 ${TOP_INCDIR}/afs/pterror.h \
52 ${TOP_INCDIR}/afs/ptint.h \
53 ${TOP_INCDIR}/afs/ptserver.h
58 ptserver: ptserver.o ptutils.o ptprocs.o ptint.ss.o ptint.xdr.o utils.o $(LIBS) ${TOP_LIBDIR}/libaudit.a
59 $(CC) ${CFLAGS} -o ptserver ptserver.o ptutils.o ptprocs.o ptint.ss.o ptint.xdr.o utils.o $(LIBS) ${XLIBS} ${TOP_LIBDIR}/libaudit.a
61 ptserver.o: ptserver.c ${INCLS} AFS_component_version_number.c
63 ptutils.o: ptutils.c ${INCLS}
65 ptprocs.o: ptprocs.c ${INCLS}
67 utils.o: utils.c ${INCLS}
69 ptint.ss.o: ptint.ss.c ptint.xdr.c ptint.xg
70 ptint.cs.o: ptint.cs.c ptint.xdr.c ptint.xg
71 ptint.xdr.o: ptint.xdr.c ptint.h ptint.xg
74 ${RXGEN} -x -C -o $@ ${srcdir}/ptint.xg
77 ${RXGEN} -x -S -o $@ ${srcdir}/ptint.xg
80 ${RXGEN} -x -c -o $@ ${srcdir}/ptint.xg
83 ${RXGEN} -x -h -o $@ ${srcdir}/ptint.xg
89 Kptint.cs.c: ptint.xg Kptint.h
90 ${RXGEN} -x -k -C -o Kptint.cs.c ${srcdir}/ptint.xg
92 Kptint.xdr.c: ptint.xg
93 ${RXGEN} -x -k -c -o Kptint.xdr.c ${srcdir}/ptint.xg
96 ${RXGEN} -x -k -h -o Kptint.h ${srcdir}/ptint.xg
98 display.o: display.c ${INCLS}
100 db_verify.o: db_verify.c ${INCLS} AFS_component_version_number.c
102 db_verify: db_verify.o pterror.o display.o $(LIBS)
103 $(CC) ${CFLAGS} -o db_verify db_verify.o display.o pterror.o $(LIBS) ${XLIBS} ${TOP_LIBDIR}/libcmd.a
105 ptclient: ptclient.o display.o libprot.a $(LIBS)
106 $(CC) ${CFLAGS} -o ptclient ptclient.o display.o libprot.a $(LIBS) ${XLIBS}
108 ptclient.o: ptclient.c ${INCLS} AFS_component_version_number.c
110 ptuser.o: ptuser.c ${LINCLS}
112 pterror.h pterror.c: pterror.et
113 $(RM) -f pterror.h pterror.c
114 ${COMPILE_ET} -p ${srcdir} pterror
116 libprot.a: ptuser.o pterror.o ptint.cs.o ptint.xdr.o AFS_component_version_number.o
118 $(AR) crv $@ ptuser.o pterror.o ptint.cs.o ptint.xdr.o AFS_component_version_number.o
121 pts: pts.o libprot.a ${TOP_LIBDIR}/libcmd.a $(LIBS)
122 $(CC) ${CFLAGS} -o pts pts.o ${TOP_LIBDIR}/libcmd.a libprot.a ${LIBS} ${XLIBS}
124 pts.o: pts.c ${LINCLS} ${TOP_INCDIR}/afs/cmd.h AFS_component_version_number.c
126 readgroup: readgroup.o libprot.a $(LIBS)
127 $(CC) ${CFLAGS} -o readgroup readgroup.o libprot.a ${LIBS} ${XLIBS}
129 readgroup.o: readgroup.c ${LINCLS} AFS_component_version_number.c
131 readpwd: readpwd.o libprot.a $(LIBS)
132 $(CC) ${CFLAGS} -o readpwd readpwd.o libprot.a ${LIBS} ${XLIBS}
134 readpwd.o: readpwd.c ${LINCLS} AFS_component_version_number.c
136 testpt: testpt.o libprot.a ${TOP_LIBDIR}/libcmd.a $(LIBS)
137 case "$(SYS_NAME)" in \
139 $(CC) ${CFLAGS} -o testpt testpt.o ${TOP_LIBDIR}/libcmd.a libprot.a $(LIBS) ;; \
141 $(CC) ${CFLAGS} -o testpt testpt.o -lm ${TOP_LIBDIR}/libcmd.a libprot.a $(LIBS) ${XLIBS} ;; \
144 testpt.o: testpt.c ${INCLS} ${TOP_INCDIR}/afs/cmd.h AFS_component_version_number.c
146 pt_util: pt_util.o ptutils.o ubik.o utils.o libprot.a $(LIBS)
147 $(CC) ${CFLAGS} -o pt_util pt_util.o ptutils.o ubik.o utils.o libprot.a $(LIBS) ${XLIBS}
149 ubik.o: ubik.c ${INCLS}
153 echo '#define ERROR_TABLE_BASE_pr ERROR_TABLE_BASE_PT' >> $@
156 # Installation targets
159 ${DESTDIR}${afssrvlibexecdir}/ptserver \
160 ${DESTDIR}${afssrvbindir}/pts \
161 ${DESTDIR}${bindir}/pts \
162 ${DESTDIR}${afssrvsbindir}/pt_util \
163 ${DESTDIR}${afssrvsbindir}/prdb_check \
164 ${DESTDIR}${libdir}/afs/libprot.a \
165 ${DESTDIR}${includedir}/afs/prclient.h \
166 ${DESTDIR}${includedir}/afs/prerror.h \
167 ${DESTDIR}${includedir}/afs/print.h \
168 ${DESTDIR}${includedir}/afs/prserver.h \
169 ${DESTDIR}${includedir}/afs/ptclient.h \
170 ${DESTDIR}${includedir}/afs/pterror.h \
171 ${DESTDIR}${includedir}/afs/ptint.h \
172 ${DESTDIR}${includedir}/afs/ptserver.h
174 ${DEST}/root.server/usr/afs/bin/ptserver: ptserver
177 ${DEST}/bin/pts ${DEST}/root.server/usr/afs/bin/pts: pts
180 ${DEST}/root.server/usr/afs/bin/pt_util: pt_util
183 ${DEST}/lib/afs/libprot.a: libprot.a
186 ${DEST}/etc/prdb_check: db_verify
189 ${DEST}/include/afs/prclient.h: ptclient.h
192 ${DEST}/include/afs/prerror.h: pterror.h
195 ${DEST}/include/afs/print.h: ptint.h
198 ${DEST}/include/afs/prserver.h: ptserver.h
201 ${DEST}/include/afs/ptserver.h: ptserver.h
204 ${DEST}/include/afs/ptint.h: ptint.h
207 ${DEST}/include/afs/pterror.h: pterror.h
210 ${DEST}/include/afs/ptclient.h: ptclient.h
217 $(RM) -f *.a *.o ptserver ptint.cs.c ptint.ss.c ptclient ptint.xdr.c ptint.h \
218 libprot.a pts readgroup readpwd db_verify testpt pt_util pterror.h pterror.c \
219 core AFS_component_version_number.c Kptint.cs.c Kptint.h Kptint.xdr.c
221 include ../config/Makefile.version
222 ${DESTDIR}${afssrvlibexecdir}/ptserver: ptserver
225 ${DESTDIR}${afssrvbindir}/pts: pts
228 ${DESTDIR}${bindir}/pts: pts
231 ${DESTDIR}${afssrvsbindir}/pt_util: pt_util
234 ${DESTDIR}${afssrvsbindir}/prdb_check: db_verify
237 ${DESTDIR}${libdir}/afs/libprot.a: libprot.a
240 ${TOP_LIBDIR}/libprot.a: libprot.a
243 ${DESTDIR}${includedir}/afs/prclient.h: ptclient.h
246 ${TOP_INCDIR}/afs/prclient.h: ptclient.h
249 ${DESTDIR}${includedir}/afs/prerror.h: pterror.h
252 ${TOP_INCDIR}/afs/prerror.h: pterror.h
255 ${DESTDIR}${includedir}/afs/print.h: ptint.h
258 ${TOP_INCDIR}/afs/print.h: ptint.h
261 ${DESTDIR}${includedir}/afs/prserver.h: ptserver.h
264 ${TOP_INCDIR}/afs/prserver.h: ptserver.h
267 ${DESTDIR}${includedir}/afs/ptclient.h: ptclient.h
270 ${TOP_INCDIR}/afs/ptclient.h: ptclient.h
273 ${DESTDIR}${includedir}/afs/pterror.h: pterror.h
276 ${TOP_INCDIR}/afs/pterror.h: pterror.h
279 ${DESTDIR}${includedir}/afs/ptint.h: ptint.h
282 ${TOP_INCDIR}/afs/ptint.h: ptint.h
285 ${DESTDIR}${includedir}/afs/ptserver.h: ptserver.h
288 ${TOP_INCDIR}/afs/ptserver.h: ptserver.h
292 ${DEST}/root.server/usr/afs/bin/ptserver \
293 ${DEST}/root.server/usr/afs/bin/pts \
295 ${DEST}/root.server/usr/afs/bin/pt_util \
296 ${DEST}/etc/prdb_check \
297 ${DEST}/lib/afs/libprot.a \
298 ${DEST}/include/afs/prclient.h \
299 ${DEST}/include/afs/prerror.h \
300 ${DEST}/include/afs/print.h \
301 ${DEST}/include/afs/prserver.h \
302 ${DEST}/include/afs/ptclient.h \
303 ${DEST}/include/afs/pterror.h \
304 ${DEST}/include/afs/ptint.h \
305 ${DEST}/include/afs/ptserver.h