no-copy-libafs-builds-20021015
[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 srcdir=@srcdir@
8 include @TOP_OBJDIR@/src/config/Makefile.config
9
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  \
13         ${TOP_INCDIR}/lwp.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
19
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
28
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
39
40
41 all: ptserver pts pt_util db_verify ${TOP_LIBDIR}/libprot.a \
42         depinstall readgroup readpwd testpt
43
44 depinstall: \
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
54
55 #
56 # Build targets
57 #
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
60
61 ptserver.o: ptserver.c ${INCLS} AFS_component_version_number.c
62
63 ptutils.o: ptutils.c ${INCLS}
64
65 ptprocs.o: ptprocs.c ${INCLS}
66
67 utils.o: utils.c ${INCLS} 
68
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
72
73 ptint.cs.c: ptint.xg
74         ${RXGEN} -x -C -o $@ ${srcdir}/ptint.xg
75
76 ptint.ss.c: ptint.xg
77         ${RXGEN} -x -S -o $@ ${srcdir}/ptint.xg
78
79 ptint.xdr.c: ptint.xg
80         ${RXGEN} -x -c -o $@ ${srcdir}/ptint.xg
81
82 ptint.h: ptint.xg
83         ${RXGEN} -x -h -o $@ ${srcdir}/ptint.xg
84
85 ptint.cs.c: ptint.h
86 ptint.ss.c: ptint.h
87 ptint.xdr.c: ptint.h
88
89 Kptint.cs.c: ptint.xg Kptint.h
90         ${RXGEN} -x -k -C -o Kptint.cs.c ${srcdir}/ptint.xg
91  
92 Kptint.xdr.c: ptint.xg
93         ${RXGEN} -x -k -c -o Kptint.xdr.c ${srcdir}/ptint.xg
94  
95 Kptint.h: ptint.xg
96         ${RXGEN} -x -k -h -o Kptint.h ${srcdir}/ptint.xg
97
98 display.o: display.c ${INCLS}
99
100 db_verify.o: db_verify.c ${INCLS} AFS_component_version_number.c
101
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
104
105 ptclient: ptclient.o display.o libprot.a $(LIBS)
106         $(CC) ${CFLAGS} -o ptclient ptclient.o display.o libprot.a $(LIBS) ${XLIBS}
107
108 ptclient.o: ptclient.c ${INCLS} AFS_component_version_number.c
109
110 ptuser.o: ptuser.c ${LINCLS}
111
112 pterror.h pterror.c: pterror.et
113         $(RM) -f pterror.h pterror.c
114         ${COMPILE_ET} -p ${srcdir} pterror
115
116 libprot.a: ptuser.o pterror.o ptint.cs.o ptint.xdr.o AFS_component_version_number.o
117         $(RM) -f $@
118         $(AR) crv $@ ptuser.o pterror.o ptint.cs.o ptint.xdr.o AFS_component_version_number.o
119         $(RANLIB) $@
120
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}
123
124 pts.o: pts.c ${LINCLS} ${TOP_INCDIR}/afs/cmd.h AFS_component_version_number.c
125
126 readgroup: readgroup.o libprot.a $(LIBS)
127         $(CC) ${CFLAGS} -o readgroup readgroup.o libprot.a ${LIBS} ${XLIBS}
128
129 readgroup.o: readgroup.c ${LINCLS} AFS_component_version_number.c
130
131 readpwd: readpwd.o libprot.a $(LIBS)
132         $(CC) ${CFLAGS} -o readpwd readpwd.o libprot.a ${LIBS} ${XLIBS}
133
134 readpwd.o: readpwd.c ${LINCLS} AFS_component_version_number.c
135
136 testpt: testpt.o libprot.a ${TOP_LIBDIR}/libcmd.a $(LIBS)
137         case "$(SYS_NAME)" in \
138         ppc_darwin_12 ) \
139                 $(CC) ${CFLAGS} -o testpt testpt.o ${TOP_LIBDIR}/libcmd.a libprot.a $(LIBS) ;; \
140         * ) \
141                 $(CC) ${CFLAGS} -o testpt testpt.o -lm ${TOP_LIBDIR}/libcmd.a libprot.a $(LIBS) ${XLIBS} ;; \
142         esac
143
144 testpt.o: testpt.c ${INCLS} ${TOP_INCDIR}/afs/cmd.h AFS_component_version_number.c
145
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}
148
149 ubik.o: ubik.c ${INCLS}
150
151 prerror.h: pterror.h
152         ${INSTALL} $? $@
153         echo '#define ERROR_TABLE_BASE_pr ERROR_TABLE_BASE_PT' >> $@
154
155 #
156 # Installation targets
157 #
158 install: \
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
173
174 ${DEST}/root.server/usr/afs/bin/ptserver: ptserver
175         ${INSTALL} $? $@
176
177 ${DEST}/bin/pts ${DEST}/root.server/usr/afs/bin/pts: pts
178         ${INSTALL} $? $@
179
180 ${DEST}/root.server/usr/afs/bin/pt_util: pt_util
181         ${INSTALL} $? $@
182
183 ${DEST}/lib/afs/libprot.a: libprot.a
184         ${INSTALL} $? $@
185
186 ${DEST}/etc/prdb_check: db_verify
187         ${INSTALL} -f $? $@
188
189 ${DEST}/include/afs/prclient.h: ptclient.h
190         ${INSTALL} $? $@
191
192 ${DEST}/include/afs/prerror.h: pterror.h
193         ${INSTALL} $? $@
194
195 ${DEST}/include/afs/print.h: ptint.h
196         ${INSTALL} $? $@
197
198 ${DEST}/include/afs/prserver.h: ptserver.h
199         ${INSTALL} $? $@
200
201 ${DEST}/include/afs/ptserver.h: ptserver.h
202         ${INSTALL} $? $@
203
204 ${DEST}/include/afs/ptint.h: ptint.h
205         ${INSTALL} $? $@
206
207 ${DEST}/include/afs/pterror.h: pterror.h
208         ${INSTALL} $? $@
209
210 ${DEST}/include/afs/ptclient.h: ptclient.h
211         ${INSTALL} $? $@
212
213 #
214 # Misc. targets
215 #
216 clean:
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
220
221 include ../config/Makefile.version
222 ${DESTDIR}${afssrvlibexecdir}/ptserver: ptserver
223         ${INSTALL} $? $@
224
225 ${DESTDIR}${afssrvbindir}/pts: pts
226         ${INSTALL} $? $@
227
228 ${DESTDIR}${bindir}/pts: pts
229         ${INSTALL} $? $@
230
231 ${DESTDIR}${afssrvsbindir}/pt_util: pt_util
232         ${INSTALL} $? $@
233
234 ${DESTDIR}${afssrvsbindir}/prdb_check: db_verify
235         ${INSTALL} -f $? $@
236
237 ${DESTDIR}${libdir}/afs/libprot.a: libprot.a
238         ${INSTALL} $? $@
239
240 ${TOP_LIBDIR}/libprot.a: libprot.a
241         ${INSTALL} $? $@
242
243 ${DESTDIR}${includedir}/afs/prclient.h: ptclient.h
244         ${INSTALL} $? $@
245
246 ${TOP_INCDIR}/afs/prclient.h: ptclient.h
247         ${INSTALL} $? $@
248
249 ${DESTDIR}${includedir}/afs/prerror.h: pterror.h
250         ${INSTALL} $? $@
251
252 ${TOP_INCDIR}/afs/prerror.h: pterror.h
253         ${INSTALL} $? $@
254
255 ${DESTDIR}${includedir}/afs/print.h: ptint.h
256         ${INSTALL} $? $@
257
258 ${TOP_INCDIR}/afs/print.h: ptint.h
259         ${INSTALL} $? $@
260
261 ${DESTDIR}${includedir}/afs/prserver.h: ptserver.h
262         ${INSTALL} $? $@
263
264 ${TOP_INCDIR}/afs/prserver.h: ptserver.h
265         ${INSTALL} $? $@
266
267 ${DESTDIR}${includedir}/afs/ptclient.h: ptclient.h
268         ${INSTALL} $? $@
269
270 ${TOP_INCDIR}/afs/ptclient.h: ptclient.h
271         ${INSTALL} $? $@
272
273 ${DESTDIR}${includedir}/afs/pterror.h: pterror.h
274         ${INSTALL} $? $@
275
276 ${TOP_INCDIR}/afs/pterror.h: pterror.h
277         ${INSTALL} $? $@
278
279 ${DESTDIR}${includedir}/afs/ptint.h: ptint.h
280         ${INSTALL} $? $@
281
282 ${TOP_INCDIR}/afs/ptint.h: ptint.h
283         ${INSTALL} $? $@
284
285 ${DESTDIR}${includedir}/afs/ptserver.h: ptserver.h
286         ${INSTALL} $? $@
287
288 ${TOP_INCDIR}/afs/ptserver.h: ptserver.h
289         ${INSTALL} $? $@
290
291 dest: \
292         ${DEST}/root.server/usr/afs/bin/ptserver \
293         ${DEST}/root.server/usr/afs/bin/pts \
294         ${DEST}/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