Commit | Line | Data |
---|---|---|
805e021f CE |
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 | include @TOP_OBJDIR@/src/config/Makefile.lwp | |
10 | include @TOP_OBJDIR@/src/config/Makefile.lwptool | |
11 | ||
12 | ENABLE_PTHREADED_UBIK=@ENABLE_PTHREADED_UBIK@ | |
13 | ||
14 | INCLS=${TOP_INCDIR}/ubik.h \ | |
15 | ${TOP_INCDIR}/lock.h \ | |
16 | ${TOP_INCDIR}/lwp.h \ | |
17 | ${TOP_INCDIR}/rx/rx.h \ | |
18 | ${TOP_INCDIR}/rx/xdr.h \ | |
19 | ${TOP_INCDIR}/afs/keys.h \ | |
20 | ${TOP_INCDIR}/afs/cellconfig.h \ | |
21 | ptserver.h ptclient.h ptuser.h ptint.h pterror.h map.h ptprototypes.h | |
22 | ||
23 | LINCLS=${TOP_INCDIR}/ubik.h \ | |
24 | ${TOP_INCDIR}/lock.h \ | |
25 | ${TOP_INCDIR}/rx/rx.h \ | |
26 | ${TOP_INCDIR}/rx/xdr.h \ | |
27 | ${TOP_INCDIR}/rx/rxkad.h \ | |
28 | ${TOP_INCDIR}/afs/auth.h \ | |
29 | ${TOP_INCDIR}/afs/cellconfig.h \ | |
30 | ptclient.h ptuser.h ptint.h pterror.h | |
31 | ||
32 | LIBS= ${TOP_LIBDIR}/libubik.a \ | |
33 | ${TOP_LIBDIR}/libauth.a \ | |
34 | ${TOP_LIBDIR}/librxkad.a \ | |
35 | ${TOP_LIBDIR}/librxstat.a \ | |
36 | ${TOP_LIBDIR}/librx.a \ | |
37 | ${TOP_LIBDIR}/liblwp.a \ | |
38 | ${TOP_LIBDIR}/libcmd.a \ | |
39 | ${TOP_LIBDIR}/libafscom_err.a \ | |
40 | ${TOP_LIBDIR}/libsys.a \ | |
41 | ${TOP_LIBDIR}/libaudit.a \ | |
42 | ${TOP_LIBDIR}/libafsutil.a \ | |
43 | ${TOP_LIBDIR}/libopr.a \ | |
44 | ${TOP_LIBDIR}/libafsrfc3961.a \ | |
45 | ${TOP_LIBDIR}/libafshcrypto_lwp.a | |
46 | ||
47 | LT_objs = ptuser.lo pterror.lo ptint.cs.lo ptint.xdr.lo display.lo | |
48 | ||
49 | LT_deps = $(top_builddir)/src/opr/liboafs_opr.la \ | |
50 | $(top_builddir)/src/rx/liboafs_rx.la \ | |
51 | $(top_builddir)/src/ubik/liboafs_ubik.la \ | |
52 | $(top_builddir)/src/auth/liboafs_auth.la | |
53 | LT_libs = | |
54 | ||
55 | all: ptserver pts pt_util db_verify liboafs_prot.la libprot_pic.la \ | |
56 | ${TOP_LIBDIR}/libprot.a depinstall readgroup readpwd testpt ptclient | |
57 | ||
58 | generated: \ | |
59 | pterror.h pterror.c \ | |
60 | ptint.cs.c ptint.ss.c ptint.xdr.c ptint.h | |
61 | ||
62 | depinstall: \ | |
63 | ptint.cs.c ptint.xdr.c \ | |
64 | ${TOP_INCDIR}/afs/prclient.h \ | |
65 | ${TOP_INCDIR}/afs/prerror.h \ | |
66 | ${TOP_INCDIR}/afs/print.h \ | |
67 | ${TOP_INCDIR}/afs/prserver.h \ | |
68 | ${TOP_INCDIR}/afs/ptclient.h \ | |
69 | ${TOP_INCDIR}/afs/ptuser.h \ | |
70 | ${TOP_INCDIR}/afs/pterror.h \ | |
71 | ${TOP_INCDIR}/afs/ptint.h \ | |
72 | ${TOP_INCDIR}/afs/ptserver.h | |
73 | ||
74 | ${TOP_LIBDIR}/libprot.a: libprot.a | |
75 | ${INSTALL_DATA} $? $@ | |
76 | ||
77 | ${TOP_INCDIR}/afs/prclient.h: ptclient.h | |
78 | ${INSTALL_DATA} $? $@ | |
79 | ||
80 | ${TOP_INCDIR}/afs/prerror.h: pterror.h | |
81 | ${INSTALL_DATA} $? $@ | |
82 | ||
83 | ${TOP_INCDIR}/afs/print.h: ptint.h | |
84 | ${INSTALL_DATA} $? $@ | |
85 | ||
86 | ${TOP_INCDIR}/afs/prserver.h: ptserver.h | |
87 | ${INSTALL_DATA} $? $@ | |
88 | ||
89 | ${TOP_INCDIR}/afs/ptclient.h: ptclient.h | |
90 | ${INSTALL_DATA} $? $@ | |
91 | ||
92 | ${TOP_INCDIR}/afs/ptuser.h: ptuser.h | |
93 | ${INSTALL_DATA} $? $@ | |
94 | ||
95 | ${TOP_INCDIR}/afs/pterror.h: pterror.h | |
96 | ${INSTALL_DATA} $? $@ | |
97 | ||
98 | ${TOP_INCDIR}/afs/ptint.h: ptint.h | |
99 | ${INSTALL_DATA} $? $@ | |
100 | ||
101 | ${TOP_INCDIR}/afs/ptserver.h: ptserver.h | |
102 | ${INSTALL_DATA} $? $@ | |
103 | ||
104 | # | |
105 | # Build targets | |
106 | # | |
107 | ptserver: ptserver.o ptutils.o ptprocs.o ptint.ss.o ptint.xdr.lo utils.o $(LIBS) map.o | |
108 | $(AFS_LDRULE) ptserver.o ptutils.o ptprocs.o ptint.ss.o .lwp/ptint.xdr.o \ | |
109 | utils.o map.o $(LIBS) $(LIB_roken) ${XLIBS} | |
110 | ||
111 | ptserver.o: ptserver.c ${INCLS} AFS_component_version_number.c | |
112 | ||
113 | # When supergroups is enabled, some parts of ptserver cast between | |
114 | # incompatible structs. | |
115 | CFLAGS_ptutils.o = @CFLAGS_NOSTRICT@ | |
116 | CFLAGS_ptprocs.o = @CFLAGS_NOSTRICT@ | |
117 | ||
118 | ptutils.o: ptutils.c ${INCLS} | |
119 | ptprocs.o: ptprocs.c ${INCLS} | |
120 | utils.o: utils.c ${INCLS} | |
121 | map.o: map.c ${INCLS} | |
122 | ptint.ss.o: ptint.ss.c ptint.xdr.c ptint.xg | |
123 | ptint.cs.lo: ptint.cs.c ptint.xdr.c ptint.xg | |
124 | ptint.xdr.lo: ptint.xdr.c ptint.h ptint.xg | |
125 | ||
126 | ptint.cs.c: ptint.xg | |
127 | ${RXGEN} -A -x -C -u -o $@ ${srcdir}/ptint.xg | |
128 | ||
129 | ptint.ss.c: ptint.xg | |
130 | ${RXGEN} -A -x -S -o $@ ${srcdir}/ptint.xg | |
131 | ||
132 | ptint.xdr.c: ptint.xg | |
133 | ${RXGEN} -A -x -c -o $@ ${srcdir}/ptint.xg | |
134 | ||
135 | ptint.h: ptint.xg | |
136 | ${RXGEN} -A -x -h -u -o $@ ${srcdir}/ptint.xg | |
137 | ||
138 | ptint.cs.c: ptint.h | |
139 | ptint.ss.c: ptint.h | |
140 | ptint.xdr.c: ptint.h | |
141 | ||
142 | Kptint.cs.c: ptint.xg Kptint.h | |
143 | ${RXGEN} -A -x -k -C -o Kptint.cs.c ${srcdir}/ptint.xg | |
144 | ||
145 | Kptint.xdr.c: ptint.xg | |
146 | ${RXGEN} -A -x -k -c -o Kptint.xdr.c ${srcdir}/ptint.xg | |
147 | ||
148 | Kptint.h: ptint.xg | |
149 | ${RXGEN} -A -x -k -h -o Kptint.h ${srcdir}/ptint.xg | |
150 | ||
151 | db_verify.o: db_verify.c ${INCLS} AFS_component_version_number.c | |
152 | ||
153 | db_verify: db_verify.o libprot.a $(LIBS) | |
154 | $(AFS_LDRULE) db_verify.o libprot.a \ | |
155 | $(LIBS) $(LIB_roken) ${XLIBS} | |
156 | ||
157 | ptclient: ptclient.o libprot.a $(LIBS) | |
158 | $(AFS_LDRULE) ptclient.o libprot.a \ | |
159 | $(LIBS) $(LIB_roken) ${XLIBS} | |
160 | ||
161 | ptclient.o: ptclient.c ${INCLS} AFS_component_version_number.c | |
162 | ||
163 | pterror.c: pterror.et | |
164 | ${COMPILE_ET_C} -p ${srcdir} pterror | |
165 | ||
166 | pterror.h: pterror.et | |
167 | ${COMPILE_ET_H} -p ${srcdir} pterror | |
168 | ||
169 | db_verify.o db_verify.lo: pterror.h | |
170 | ptclient.o ptclient.lo: pterror.h | |
171 | ptprocs.o ptprocs.lo: pterror.h | |
172 | pts.o pts.lo: pterror.h | |
173 | ptuser.o ptuser.lo: pterror.h | |
174 | pt_util.o pt_util.lo: pterror.h | |
175 | ptutils.o ptutils.lo: pterror.h | |
176 | readgroup.o readgroup.lo: pterror.h | |
177 | testpt.o testpt.lo: pterror.h | |
178 | utils.o utils.lo: pterror.h | |
179 | ||
180 | display.lo: $(INCLS) | |
181 | ptuser.lo: $(LINCLS) | |
182 | ||
183 | liboafs_prot.la: liboafs_prot.la.sym $(LT_objs) $(LT_deps) | |
184 | $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs) | |
185 | ||
186 | libprot_pic.la: $(LT_objs) | |
187 | $(LT_LDLIB_pic) $(LT_objs) | |
188 | ||
189 | libprot.a: $(LT_objs) | |
190 | $(LT_LDLIB_lwp) $(LT_objs) | |
191 | ||
192 | pts: pts.o libprot.a ${TOP_LIBDIR}/libcmd.a $(LIBS) | |
193 | $(AFS_LDRULE) pts.o ${TOP_LIBDIR}/libcmd.a libprot.a \ | |
194 | ${LIBS} $(LIB_roken) ${XLIBS} | |
195 | ||
196 | pts.o: pts.c ${LINCLS} ${TOP_INCDIR}/afs/cmd.h AFS_component_version_number.c | |
197 | ||
198 | readgroup: readgroup.o libprot.a $(LIBS) | |
199 | $(AFS_LDRULE) readgroup.o libprot.a \ | |
200 | ${LIBS} $(LIB_roken) ${XLIBS} | |
201 | ||
202 | readgroup.o: readgroup.c ${LINCLS} AFS_component_version_number.c | |
203 | ||
204 | readpwd: readpwd.o libprot.a $(LIBS) | |
205 | $(AFS_LDRULE) readpwd.o libprot.a \ | |
206 | ${LIBS} $(LIB_roken) ${XLIBS} | |
207 | ||
208 | readpwd.o: readpwd.c ${LINCLS} AFS_component_version_number.c | |
209 | ||
210 | testpt: testpt.o libprot.a ${TOP_LIBDIR}/libcmd.a $(LIBS) | |
211 | case "$(SYS_NAME)" in \ | |
212 | *_darwin_12 ) \ | |
213 | $(AFS_LDRULE_NOQ) testpt.o ${TOP_LIBDIR}/libcmd.a \ | |
214 | libprot.a $(LIBS) $(LIB_roken) ;; \ | |
215 | * ) \ | |
216 | $(AFS_LDRULE_NOQ) testpt.o -lm ${TOP_LIBDIR}/libcmd.a \ | |
217 | libprot.a $(LIBS) $(LIB_roken) ${XLIBS} ;; \ | |
218 | esac | |
219 | ||
220 | testpt.o: testpt.c ${INCLS} ${TOP_INCDIR}/afs/cmd.h AFS_component_version_number.c | |
221 | ||
222 | pt_util: pt_util.o ptutils.o ptubik.o utils.o map.o libprot.a $(LIBS) | |
223 | $(AFS_LDRULE) pt_util.o ptutils.o ptubik.o utils.o map.o libprot.a \ | |
224 | ${TOP_LIBDIR}/libcmd.a $(LIBS) $(LIB_roken) ${XLIBS} | |
225 | ||
226 | ptubik.o: ptubik.c ${INCLS} | |
227 | ||
228 | prerror.h: pterror.h | |
229 | ${INSTALL_DATA} $? $@ | |
230 | echo '#define ERROR_TABLE_BASE_pr ERROR_TABLE_BASE_PT' >> $@ | |
231 | ||
232 | # | |
233 | # Installation targets | |
234 | # | |
235 | install: ptserver pts pt_util db_verify libprot.a ptclient.h pterror.h \ | |
236 | ptint.h ptserver.h | |
237 | ${INSTALL} -d ${DESTDIR}${afssrvlibexecdir} | |
238 | ${INSTALL} -d ${DESTDIR}${afssrvbindir} | |
239 | ${INSTALL} -d ${DESTDIR}${afssrvsbindir} | |
240 | ${INSTALL} -d ${DESTDIR}${bindir} | |
241 | ${INSTALL} -d ${DESTDIR}${libdir}/afs | |
242 | ${INSTALL} -d ${DESTDIR}${includedir}/afs | |
243 | if [ "x$(ENABLE_PTHREADED_UBIK)" != "xyes" ] ; then \ | |
244 | ${INSTALL_PROGRAM} ptserver ${DESTDIR}${afssrvlibexecdir}/ptserver; \ | |
245 | ${INSTALL_PROGRAM} pts ${DESTDIR}${afssrvbindir}/pts; \ | |
246 | ${INSTALL_PROGRAM} pts ${DESTDIR}${bindir}/pts; \ | |
247 | ${INSTALL_PROGRAM} pt_util ${DESTDIR}${afssrvsbindir}/pt_util; \ | |
248 | ${INSTALL_PROGRAM} db_verify ${DESTDIR}${afssrvsbindir}/prdb_check; \ | |
249 | fi | |
250 | ${INSTALL_DATA} libprot.a ${DESTDIR}${libdir}/afs/libprot.a | |
251 | ${INSTALL_DATA} ${srcdir}/ptclient.h ${DESTDIR}${includedir}/afs/prclient.h | |
252 | ${INSTALL_DATA} pterror.h ${DESTDIR}${includedir}/afs/prerror.h | |
253 | ${INSTALL_DATA} ptint.h ${DESTDIR}${includedir}/afs/print.h | |
254 | ${INSTALL_DATA} ${srcdir}/ptserver.h ${DESTDIR}${includedir}/afs/prserver.h | |
255 | ${INSTALL_DATA} ${srcdir}/ptclient.h ${DESTDIR}${includedir}/afs/ptclient.h | |
256 | ${INSTALL_DATA} ${srcdir}/ptuser.h ${DESTDIR}${includedir}/afs/ptuser.h | |
257 | ${INSTALL_DATA} pterror.h ${DESTDIR}${includedir}/afs/pterror.h | |
258 | ${INSTALL_DATA} ptint.h ${DESTDIR}${includedir}/afs/ptint.h | |
259 | ${INSTALL_DATA} ${srcdir}/ptserver.h ${DESTDIR}${includedir}/afs/ptserver.h | |
260 | ||
261 | dest: ptserver pts pt_util db_verify libprot.a ptclient.h pterror.h \ | |
262 | ptint.h ptserver.h | |
263 | ${INSTALL} -d ${DEST}/root.server/usr/afs/bin | |
264 | ${INSTALL} -d ${DEST}/bin | |
265 | ${INSTALL} -d ${DEST}/etc | |
266 | ${INSTALL} -d ${DEST}/lib/afs | |
267 | ${INSTALL} -d ${DEST}/include/afs | |
268 | if [ "x$(ENABLE_PTHREADED_UBIK)" != "xyes" ] ; then \ | |
269 | ${INSTALL_PROGRAM} ptserver ${DEST}/root.server/usr/afs/bin/ptserver; \ | |
270 | ${INSTALL_PROGRAM} pts ${DEST}/root.server/usr/afs/bin/pts; \ | |
271 | ${INSTALL_PROGRAM} pts ${DEST}/bin/pts; \ | |
272 | ${INSTALL_PROGRAM} pt_util ${DEST}/root.server/usr/afs/bin/pt_util; \ | |
273 | ${INSTALL_PROGRAM} db_verify ${DEST}/etc/prdb_check; \ | |
274 | fi; | |
275 | ${INSTALL_DATA} libprot.a ${DEST}/lib/afs/libprot.a | |
276 | ${INSTALL_DATA} ${srcdir}/ptclient.h ${DEST}/include/afs/prclient.h | |
277 | ${INSTALL_DATA} pterror.h ${DEST}/include/afs/prerror.h | |
278 | ${INSTALL_DATA} ptint.h ${DEST}/include/afs/print.h | |
279 | ${INSTALL_DATA} ${srcdir}/ptserver.h ${DEST}/include/afs/prserver.h | |
280 | ${INSTALL_DATA} ${srcdir}/ptclient.h ${DEST}/include/afs/ptclient.h | |
281 | ${INSTALL_DATA} ${srcdir}/ptuser.h ${DEST}/include/afs/ptuser.h | |
282 | ${INSTALL_DATA} pterror.h ${DEST}/include/afs/pterror.h | |
283 | ${INSTALL_DATA} ptint.h ${DEST}/include/afs/ptint.h | |
284 | ${INSTALL_DATA} ${srcdir}/ptserver.h ${DEST}/include/afs/ptserver.h | |
285 | ||
286 | # | |
287 | # Misc. targets | |
288 | # | |
289 | clean: | |
290 | $(LT_CLEAN) | |
291 | $(RM) -f *.a *.o ptserver ptint.cs.c ptint.ss.c ptclient ptint.xdr.c ptint.h \ | |
292 | libprot.a pts readgroup readpwd db_verify testpt pt_util pterror.h pterror.c \ | |
293 | core AFS_component_version_number.c Kptint.cs.c Kptint.h Kptint.xdr.c | |
294 | ||
295 | include ../config/Makefile.version |