makefiles-attempt-to-support-gmake-j-20011023
[openafs.git] / src / ptserver / 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 DEST=@DEST@
8 TOP_INCDIR=@TOP_INCDIR@
9 TOP_LIBDIR=@TOP_LIBDIR@
10 TOP_OBJDIR=@TOP_OBJDIR@
11 srcdir=@srcdir@
12 VPATH=${srcdir}
13 prefix=@prefix@
14 exec_prefix=@exec_prefix@
15 bindir=@bindir@
16 sbindir=@sbindir@
17 libexecdir=@libexecdir@
18 libdir=@libdir@
19 includedir=@includedir@
20 mandir=@mandir@
21 afssrvbindir=@afssrvbindir@
22 afssrvsbindir=@afssrvsbindir@
23 afssrvlibexecdir=@afssrvlibexecdir@
24 TOP_SRCDIR=@TOP_SRCDIR@
25 SYS_NAME=@AFS_SYSNAME@
26
27 SHELL = /bin/sh
28
29 include ../config/Makefile.${SYS_NAME}
30
31 UKERNELDIR=../libuafs/
32 RXGEN=${TOP_OBJDIR}/src/rxgen/rxgen
33 COMPILE_ET=${TOP_OBJDIR}/src/comerr/compile_et
34
35 CFLAGS=-I. -I${srcdir} $(DBUG) -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
36 INCLS=${TOP_INCDIR}/ubik.h \
37         ${TOP_INCDIR}/lock.h  \
38         ${TOP_INCDIR}/lwp.h \
39         ${TOP_INCDIR}/rx/rx.h \
40         ${TOP_INCDIR}/rx/xdr.h \
41         ${TOP_INCDIR}/afs/keys.h \
42         ${TOP_INCDIR}/afs/cellconfig.h \
43         ptserver.h ptclient.h ptint.h ptopcodes.h pterror.h
44
45 LINCLS=${TOP_INCDIR}/ubik.h \
46         ${TOP_INCDIR}/lock.h \
47         ${TOP_INCDIR}/rx/rx.h \
48         ${TOP_INCDIR}/rx/xdr.h  \
49         ${TOP_INCDIR}/rx/rxkad.h \
50         ${TOP_INCDIR}/afs/auth.h \
51         ${TOP_INCDIR}/afs/cellconfig.h \
52         ptclient.h ptint.h pterror.h
53
54 LIBS=${TOP_LIBDIR}/libubik.a \
55         ${TOP_LIBDIR}/libauth.a \
56         ${TOP_LIBDIR}/librxkad.a \
57         ${TOP_LIBDIR}/librxstat.a \
58         ${TOP_LIBDIR}/librx.a \
59         ${TOP_LIBDIR}/liblwp.a \
60         ${TOP_LIBDIR}/libdes.a \
61         ${TOP_LIBDIR}/libcom_err.a \
62         ${TOP_LIBDIR}/util.a \
63         ${TOP_LIBDIR}/libsys.a
64
65
66 all: ukinstall ptserver pts pt_util db_verify ${TOP_LIBDIR}/libprot.a ${TOP_INCDIR}/afs/prclient.h ${TOP_INCDIR}/afs/prerror.h ${TOP_INCDIR}/afs/print.h ${TOP_INCDIR}/afs/prserver.h ${TOP_INCDIR}/afs/ptclient.h ${TOP_INCDIR}/afs/pterror.h ${TOP_INCDIR}/afs/ptint.h ${TOP_INCDIR}/afs/ptserver.h readgroup readpwd testpt
67
68 #
69 # Build targets
70 #
71 ptserver: ptserver.o ptutils.o ptprocs.o ptint.ss.o ptint.xdr.o utils.o $(LIBS) ${TOP_LIBDIR}/libaudit.a
72         $(CC) ${CFLAGS} -o ptserver ptserver.o ptutils.o ptprocs.o ptint.ss.o ptint.xdr.o utils.o $(LIBS) ${XLIBS} ${TOP_LIBDIR}/libaudit.a
73
74 ptserver.o: ptserver.c ${INCLS} AFS_component_version_number.c
75
76 ptutils.o: ptutils.c ${INCLS}
77
78 ptprocs.o: ptprocs.c ${INCLS}
79
80 utils.o: utils.c ${INCLS} 
81
82 ptint.ss.o: ptint.ss.c ptint.xdr.c ptint.xg
83 ptint.cs.o: ptint.cs.c ptint.xdr.c ptint.xg
84 ptint.xdr.o: ptint.xdr.c ptint.h ptint.xg
85
86 ptint.cs.c: ptint.xg
87         ${RXGEN} -x -C -o $@ ${srcdir}/ptint.xg
88
89 ptint.ss.c: ptint.xg
90         ${RXGEN} -x -S -o $@ ${srcdir}/ptint.xg
91
92 ptint.xdr.c: ptint.xg
93         ${RXGEN} -x -c -o $@ ${srcdir}/ptint.xg
94
95 ptint.h: ptint.xg
96         ${RXGEN} -x -h -o $@ ${srcdir}/ptint.xg
97
98 ptint.cs.c: ptint.h
99 ptint.ss.c: ptint.h
100 ptint.xdr.c: ptint.h
101
102 Kptint.cs.c: ptint.xg Kptint.h
103         ${RXGEN} -x -k -C -o Kptint.cs.c ${srcdir}/ptint.xg
104  
105 Kptint.xdr.c: ptint.xg
106         ${RXGEN} -x -k -c -o Kptint.xdr.c ${srcdir}/ptint.xg
107  
108 Kptint.h: ptint.xg
109         ${RXGEN} -x -k -h -o Kptint.h ${srcdir}/ptint.xg
110
111 display.o: display.c ${INCLS}
112
113 db_verify.o: db_verify.c ${INCLS} AFS_component_version_number.c
114
115 db_verify: db_verify.o pterror.o display.o $(LIBS)
116         $(CC) ${CFLAGS} -o db_verify db_verify.o display.o pterror.o $(LIBS) ${XLIBS} ${TOP_LIBDIR}/libcmd.a
117
118 ptclient: ptclient.o display.o libprot.a $(LIBS)
119         $(CC) ${CFLAGS} -o ptclient ptclient.o display.o libprot.a $(LIBS) ${XLIBS}
120
121 ptclient.o: ptclient.c ${INCLS} AFS_component_version_number.c
122
123 ptuser.o: ptuser.c ${LINCLS}
124
125 pterror.h pterror.c: pterror.et
126         $(RM) -f pterror.h pterror.c
127         ${COMPILE_ET} -p ${srcdir} pterror
128
129 libprot.a: ptuser.o pterror.o ptint.cs.o ptint.xdr.o AFS_component_version_number.o
130         $(RM) -f $@
131         $(AR) crv $@ ptuser.o pterror.o ptint.cs.o ptint.xdr.o AFS_component_version_number.o
132         $(RANLIB) $@
133
134 pts: pts.o libprot.a ${TOP_LIBDIR}/libcmd.a $(LIBS)
135         $(CC) ${CFLAGS} -o pts pts.o ${TOP_LIBDIR}/libcmd.a libprot.a ${LIBS} ${XLIBS}
136
137 pts.o: pts.c ${LINCLS} ${TOP_INCDIR}/afs/cmd.h AFS_component_version_number.c
138
139 readgroup: readgroup.o libprot.a $(LIBS)
140         $(CC) ${CFLAGS} -o readgroup readgroup.o libprot.a ${LIBS} ${XLIBS}
141
142 readgroup.o: readgroup.c ${LINCLS} AFS_component_version_number.c
143
144 readpwd: readpwd.o libprot.a $(LIBS)
145         $(CC) ${CFLAGS} -o readpwd readpwd.o libprot.a ${LIBS} ${XLIBS}
146
147 readpwd.o: readpwd.c ${LINCLS} AFS_component_version_number.c
148
149 testpt: testpt.o libprot.a ${TOP_LIBDIR}/libcmd.a $(LIBS)
150         case "$(SYS_NAME)" in \
151         ppc_darwin_12 ) \
152                 $(CC) ${CFLAGS} -o testpt testpt.o ${TOP_LIBDIR}/libcmd.a libprot.a $(LIBS) ;; \
153         * ) \
154                 $(CC) ${CFLAGS} -o testpt testpt.o -lm ${TOP_LIBDIR}/libcmd.a libprot.a $(LIBS) ${XLIBS} ;; \
155         esac
156
157 testpt.o: testpt.c ${INCLS} ${TOP_INCDIR}/afs/cmd.h AFS_component_version_number.c
158
159 pt_util: pt_util.o ptutils.o ubik.o utils.o libprot.a $(LIBS)
160         $(CC) ${CFLAGS} -o pt_util pt_util.o ptutils.o ubik.o utils.o libprot.a $(LIBS) ${XLIBS}
161
162 ubik.o: ubik.c ${INCLS}
163
164 prerror.h: pterror.h
165         ${INSTALL} $? $@
166         echo '#define ERROR_TABLE_BASE_pr ERROR_TABLE_BASE_PT' >> $@
167
168 #
169 # Installation targets
170 #
171 ukinstall: ${UKERNELDIR}/afs \
172         ${UKERNELDIR}/afsint/ptint.h \
173         ${UKERNELDIR}/afsint/ptint.cs.c \
174         ${UKERNELDIR}/afsint/ptint.xdr.c \
175         ${UKERNELDIR}/afs/ptuser.c \
176         ${UKERNELDIR}/afs/ptclient.h \
177         ${UKERNELDIR}/afs/pterror.c \
178         ${UKERNELDIR}/afs/pterror.h \
179         ${UKERNELDIR}/afs/ptserver.h
180
181 install: \
182         ${DESTDIR}${afssrvlibexecdir}/ptserver \
183         ${DESTDIR}${afssrvbindir}/pts \
184         ${DESTDIR}${bindir}/pts \
185         ${DESTDIR}${afssrvsbindir}/pt_util \
186         ${DESTDIR}${afssrvsbindir}/prdb_check \
187         ${DESTDIR}${libdir}/afs/libprot.a \
188         ${DESTDIR}${includedir}/afs/prclient.h \
189         ${DESTDIR}${includedir}/afs/prerror.h \
190         ${DESTDIR}${includedir}/afs/print.h \
191         ${DESTDIR}${includedir}/afs/prserver.h \
192         ${DESTDIR}${includedir}/afs/ptclient.h \
193         ${DESTDIR}${includedir}/afs/pterror.h \
194         ${DESTDIR}${includedir}/afs/ptint.h \
195         ${DESTDIR}${includedir}/afs/ptserver.h
196
197 ${UKERNELDIR}/afs:
198         mkdir -p $@
199
200 ${UKERNELDIR}/afs/ptuser.c: ptuser.c
201         ${INSTALL} $? $@
202
203 ${UKERNELDIR}/afs/ptclient.h: ptclient.h
204         ${INSTALL} $? $@
205
206 ${UKERNELDIR}/afs/pterror.c: pterror.c
207         ${INSTALL} $? $@
208
209 ${UKERNELDIR}/afs/pterror.h: pterror.h
210         ${INSTALL} $? $@
211
212 ${UKERNELDIR}/afs/ptserver.h: ptserver.h
213         ${INSTALL} $? $@
214
215 ${UKERNELDIR}/afsint/ptint.h: Kptint.h
216         ${INSTALL} $? $@
217
218 ${UKERNELDIR}/afsint/ptint.cs.c: Kptint.cs.c
219         ${INSTALL} $? $@
220
221 ${UKERNELDIR}/afsint/ptint.xdr.c: Kptint.xdr.c
222         ${INSTALL} $? $@
223
224 ${DEST}/root.server/usr/afs/bin/ptserver: ptserver
225         ${INSTALL} $? $@
226
227 ${DEST}/bin/pts ${DEST}/root.server/usr/afs/bin/pts: pts
228         ${INSTALL} $? $@
229
230 ${DEST}/root.server/usr/afs/bin/pt_util: pt_util
231         ${INSTALL} $? $@
232
233 ${DEST}/lib/afs/libprot.a: libprot.a
234         ${INSTALL} $? $@
235
236 ${DEST}/etc/prdb_check: db_verify
237         ${INSTALL} -f $? $@
238
239 ${DEST}/include/afs/prclient.h: ptclient.h
240         ${INSTALL} $? $@
241
242 ${DEST}/include/afs/prerror.h: pterror.h
243         ${INSTALL} $? $@
244
245 ${DEST}/include/afs/print.h: ptint.h
246         ${INSTALL} $? $@
247
248 ${DEST}/include/afs/prserver.h: ptserver.h
249         ${INSTALL} $? $@
250
251 ${DEST}/include/afs/ptserver.h: ptserver.h
252         ${INSTALL} $? $@
253
254 ${DEST}/include/afs/ptint.h: ptint.h
255         ${INSTALL} $? $@
256
257 ${DEST}/include/afs/pterror.h: pterror.h
258         ${INSTALL} $? $@
259
260 ${DEST}/include/afs/ptclient.h: ptclient.h
261         ${INSTALL} $? $@
262
263 #
264 # Misc. targets
265 #
266 clean:
267         $(RM) -f *.a *.o ptserver ptint.cs.c ptint.ss.c ptclient ptint.xdr.c ptint.h \
268         libprot.a pts readgroup readpwd db_verify testpt pt_util pterror.h pterror.c \
269         core AFS_component_version_number.c Kptint.cs.c Kptint.h Kptint.xdr.c
270
271 include ../config/Makefile.version
272 ${DESTDIR}${afssrvlibexecdir}/ptserver: ptserver
273         ${INSTALL} $? $@
274
275 ${DESTDIR}${afssrvbindir}/pts: pts
276         ${INSTALL} $? $@
277
278 ${DESTDIR}${bindir}/pts: pts
279         ${INSTALL} $? $@
280
281 ${DESTDIR}${afssrvsbindir}/pt_util: pt_util
282         ${INSTALL} $? $@
283
284 ${DESTDIR}${afssrvsbindir}/prdb_check: db_verify
285         ${INSTALL} -f $? $@
286
287 ${DESTDIR}${libdir}/afs/libprot.a: libprot.a
288         ${INSTALL} $? $@
289
290 ${TOP_LIBDIR}/libprot.a: libprot.a
291         ${INSTALL} $? $@
292
293 ${DESTDIR}${includedir}/afs/prclient.h: ptclient.h
294         ${INSTALL} $? $@
295
296 ${TOP_INCDIR}/afs/prclient.h: ptclient.h
297         ${INSTALL} $? $@
298
299 ${DESTDIR}${includedir}/afs/prerror.h: pterror.h
300         ${INSTALL} $? $@
301
302 ${TOP_INCDIR}/afs/prerror.h: pterror.h
303         ${INSTALL} $? $@
304
305 ${DESTDIR}${includedir}/afs/print.h: ptint.h
306         ${INSTALL} $? $@
307
308 ${TOP_INCDIR}/afs/print.h: ptint.h
309         ${INSTALL} $? $@
310
311 ${DESTDIR}${includedir}/afs/prserver.h: ptserver.h
312         ${INSTALL} $? $@
313
314 ${TOP_INCDIR}/afs/prserver.h: ptserver.h
315         ${INSTALL} $? $@
316
317 ${DESTDIR}${includedir}/afs/ptclient.h: ptclient.h
318         ${INSTALL} $? $@
319
320 ${TOP_INCDIR}/afs/ptclient.h: ptclient.h
321         ${INSTALL} $? $@
322
323 ${DESTDIR}${includedir}/afs/pterror.h: pterror.h
324         ${INSTALL} $? $@
325
326 ${TOP_INCDIR}/afs/pterror.h: pterror.h
327         ${INSTALL} $? $@
328
329 ${DESTDIR}${includedir}/afs/ptint.h: ptint.h
330         ${INSTALL} $? $@
331
332 ${TOP_INCDIR}/afs/ptint.h: ptint.h
333         ${INSTALL} $? $@
334
335 ${DESTDIR}${includedir}/afs/ptserver.h: ptserver.h
336         ${INSTALL} $? $@
337
338 ${TOP_INCDIR}/afs/ptserver.h: ptserver.h
339         ${INSTALL} $? $@
340
341 dest: \
342         ${DEST}/root.server/usr/afs/bin/ptserver \
343         ${DEST}/root.server/usr/afs/bin/pts \
344         ${DEST}/bin/pts \
345         ${DEST}/root.server/usr/afs/bin/pt_util \
346         ${DEST}/etc/prdb_check \
347         ${DEST}/lib/afs/libprot.a \
348         ${DEST}/include/afs/prclient.h \
349         ${DEST}/include/afs/prerror.h \
350         ${DEST}/include/afs/print.h \
351         ${DEST}/include/afs/prserver.h \
352         ${DEST}/include/afs/ptclient.h \
353         ${DEST}/include/afs/pterror.h \
354         ${DEST}/include/afs/ptint.h \
355         ${DEST}/include/afs/ptserver.h