This file is indexed.

/usr/share/cernlib/config/lnxLib.rules is in cernlib-base-dev 20061220+dfsg3-4.2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
/* $Id: lnxLib.rules,v 1.1.1.1 1995/12/20 15:26:45 cernlib Exp $
 *
 * $Log: lnxLib.rules,v $
 * Revision 1.1.1.1  1995/12/20 15:26:45  cernlib
 * X11R6 config files unmodified
 *
 *
 */
XCOMM $XConsortium: lnxLib.rules,v 1.8 95/01/16 21:11:00 kaleb Exp $

/*
 * Linux shared library rules (DLL & ELF versions)
 */
#ifndef HasSharedLibraries
#define HasSharedLibraries YES
#endif
#ifndef ForceNormalLib
#define ForceNormalLib NO
#endif

#define SharedOldX NO

#if UseElfFormat

#ifndef SharedDataSeparation
#define SharedDataSeparation NO
#endif
#ifndef SharedCodeDef
#define SharedCodeDef /**/
#endif
#ifndef SharedLibraryDef
#define SharedLibraryDef /**/
#endif
#ifndef ShLibIncludeFile
#define ShLibIncludeFile <lnxLib.tmpl>
#endif
#ifndef SharedLibraryLoadFlags
#define SharedLibraryLoadFlags --shared
#endif
#ifndef PositionIndependentCFlags
#define PositionIndependentCFlags -fPIC
#endif
#ifndef PositionIndependentCplusplusFlags
#define PositionIndependentCplusplusFlags -fPIC
#endif
#ifndef PositionIndependentFortranFlags
#define PositionIndependentFortranFlags -fPIC
#endif

/*
 * InstallSharedLibrary - generate rules to install the shared library.
 * NOTE: file must be executable, hence "INSTBINFLAGS"
 */
#ifndef InstallSharedLibrary
#define	InstallSharedLibrary(libname,rev,dest)				@@\
.PHONY: install.shlib shlib/libname					@@\
shlib/libname:: $(DESTDIR)dest/SharedLibraryTargetName(libname)		@@\
									@@\
install.shlib:: $(DESTDIR)dest/SharedLibraryTargetName(libname)		@@\
									@@\
$(DESTDIR)dest/SharedLibraryTargetName(libname): SharedLibraryTargetName(libname) @@\
	MakeDir($(DESTDIR)dest)						@@\
	$(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) SharedLibraryTargetName(libname) $(DESTDIR)dest @@\
	$(RM) SharedLibrarySonameName(libname) \
		&& $(LN) SharedLibraryTargetName(libname) $(DESTDIR)dest/SharedLibrarySonameName(libname)	@@\
	$(RM) Concat($(DESTDIR)dest/lib,libname.so)			@@\
	$(LN) SharedLibraryTargetName(libname) Concat($(DESTDIR)dest/lib,libname.so) @@\
	$(RM) $<                                                        @@\
	$(LN) $@ $<
#endif /* InstallSharedLibrary */

/*
 * InstallSharedLibraryData - generate rules to install the shared library data
 */
#ifndef InstallSharedLibraryData
#define	InstallSharedLibraryData(libname,rev,dest)
#endif /* InstallSharedLibraryData */


/*
 * SharedLibraryTarget - generate rules to create a shared library;
 * build it into a different name so that we do not hose people by having
 * the library gone for long periods.
 */
#ifndef SharedLibraryTarget
#define SharedLibraryTarget(libname,rev,solist,down,up)			@@\
AllTarget(Concat(lib,libname.so.rev))					@@\
									@@\
Concat(lib,libname.so.rev):  solist					@@\
	$(RM) $@~							@@\
	(cd down; T=`echo $@ | sed 's/\.[^\.]*$$//'`; \
		$(LD) -o up/$@~ $(SHLIBLDFLAGS) --soname $$T solist $(REQUIREDLIBS))	@@\
	$(RM) $@ 							@@\
	$(MV) $@~ $@							@@\
	$(RM) Concat(lib,libname.so)					@@\
	$(LN) $@ Concat(lib,libname.so)					@@\
	LinkBuildLibrary($@)						@@\
	LinkBuildLibrary(Concat(lib,libname.so))			@@\
									@@\
clean::									@@\
	$(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)

#endif /* SharedLibraryTarget */

/*
 * SharedLibraryDataTarget - generate rules to create shlib data file;
 */
#ifndef SharedLibraryDataTarget
#define SharedLibraryDataTarget(libname,rev,salist)
#endif /* SharedLibraryTarget */

#else /* UseElfFormat */

#ifndef SharedDataSeparation
#define SharedDataSeparation NO
#endif
#ifndef SharedCodeDef
#define SharedCodeDef /**/
#endif
#ifndef SharedLibraryDef
#define SharedLibraryDef /**/
#endif
#ifndef ShLibIncludeFile
#define ShLibIncludeFile <lnxLib.tmpl>
#endif
#ifndef SharedLibraryLoadFlags
#define SharedLibraryLoadFlags /**/
#endif
#ifndef PositionIndependentCFlags
#define PositionIndependentCFlags -B/usr/dll/jump/
#endif

/*
 * These definitions are now extended to work with the X sources and
 * external sources wishing to build shared libs.
 *
 * A library can create it's own shlibs (.so) or can be incorporated into
 * another "host" lib. All libraries generate stub (.sa) files.
 * A "host" lib does all the work to generate the stubs for itself and its
 * "guests", invoking the "guest" Makefiles to create the objects for
 * inclusion into the "host" shlib. A "guest" lib will ask the "host" to
 * create the stubfiles, then copy its own into its directory.
 * Most external libs are "host" libs; the concept of "guest" is a holdover
 * from older libs during the days of scarce shared library address space.
 *
 * To create a simple "host" shared lib, Xfoo, define:
 *
 *  JUMP_ROOT_Xfoo = <source directory>
 *  JUMP_IS_HOST_Xfoo = YES
 *  JUMP_STUBLIBS_Xfoo = libXfoo.sa
 *  JUMP_DIR_Xfoo = $(JUMP_ROOT_Xfoo)/shared		<work directory>
 *  JUMP_DEFS_Xfoo = -DFOO				<defs for jump files>
 *  JUMP_VARS_Xfoo = $(JUMP_ROOT_Xfoo)/jump_vars	<see DLL docs>
 *  JUMP_FUNCS_Xfoo = $(JUMP_ROOT_Xfoo)/jump_funcs	<see DLL docs>
 *  JUMP_IGNORE_Xfoo = $(JUMP_ROOT_Xfoo)/jump_ignore	<see DLL docs>
 *  JUMP_EXPORT_Xfoo = $(JUMP_DIR_Xfoo)/jump.vars	<exported symbols>
 *  JUMP_IMPORT_Xfoo = $(JUMP_DIR_Xbar)			<imported symbols>
 *  JUMP_ADDRESS_Xfoo = 0xXXXXXXXX			<fill in with address>
 *  JUMP_JUMPTABLESIZE_Xfoo = 0x4000			<adjust if necessary>
 *  JUMP_GOTSIZE_Xfoo = 4096				<adjust if necessary>
 *  JUMP_STUBNAMES_Xfoo = libXfoo			<and others>
 *  JUMP_STUBS_IMPORT_Xfoo = /usr/lib/libc.sa		<and others>
 *  JUMP_LDLIBS_Xfoo = `$(CC) --print-libgcc-file-name` -lc <and others>
 *
 * To create a complex "host", you need to add
 *  JUMP_SIBARS_Xt = jump/libXbar.a~			<and others>
 * These are the archives of the shared objects of the "guest" libs. They
 * need to be added to the JUMP_LDLIBS_Xfoo lines.
 *
 * For further clarification, study the definitions of libXaw, a simple "host"
 * lib, libXt, a complex "host" lib, and libXmu, one of libXts "guests".
 *
 * As a hint of how to start (with the DLL docs), touch jump_vars, jump_funcs
 * and jump_ignore, then compile. Then massage the jump.vars and jump.funcs
 * files in the shared subdirectory into jump_xxx files.
 */

#ifndef UseInstalled
XCOMM These are only needed to build the server

JUMP_LDLIBS_libc = `$(CC) --print-libgcc-file-name` -lc

XCOMM libX11.so (X11, SM, ICE)
JUMP_ROOT_X11 = $(XLIBSRC)
JUMP_IS_HOST_X11 = YES
JUMP_STUBLIBS_X11 = libX11.sa libSM.sa libICE.sa
JUMP_SIBDIRS_X11 = $(JUMP_ROOT_SM) $(JUMP_ROOT_ICE)
JUMP_DIR_X11 = $(JUMP_ROOT_X11)/shared
JUMP_DEFS_X11 = $(XDMAUTHDEFS)
JUMP_VARS_X11 = $(JUMP_ROOT_X11)/jump_vars
JUMP_FUNCS_X11 = $(JUMP_ROOT_X11)/jump_funcs
JUMP_IGNORE_X11 = $(JUMP_ROOT_X11)/jump_ignore
JUMP_EXPORT_X11 = $(JUMP_DIR_X11)/jump.vars
JUMP_ADDRESS_X11 = 0x60200000
JUMP_JUMPTABLESIZE_X11 = 0x4000
JUMP_GOTSIZE_X11 = 4096
JUMP_STUBNAMES_X11 = libX11 libSM libICE
JUMP_STUBS_IMPORT_X11 = /usr/lib/libc.sa
JUMP_SIBARS_X11 = jump/libSM.a~ jump/libICE.a~
JUMP_LDLIBS_X11 = $(JUMP_SIBARS_X11) $(JUMP_LDLIBS_libc)

XCOMM libSM (part of libX11.so)
JUMP_ROOT_SM = $(SMSRC)
JUMP_IS_HOST_SM = NO
JUMP_HOST_SM = $(JUMP_ROOT_X11)
JUMP_DIR_SM = $(JUMP_DIR_X11)

XCOMM libICE (part of libX11.so)
JUMP_ROOT_ICE = $(ICESRC)
JUMP_IS_HOST_ICE = NO
JUMP_HOST_ICE = $(JUMP_ROOT_X11)
JUMP_DIR_ICE = $(JUMP_DIR_X11)

XCOMM libXt.so (Xt, Xmu, Xext, Xi, Xtst)
JUMP_ROOT_Xt = $(TOOLKITSRC)
JUMP_IS_HOST_Xt = YES
JUMP_STUBLIBS_Xt = libXt.sa libXmu.sa libXext.sa libXi.sa libXtst.sa
JUMP_SUBDIRS_Xt = $(JUMP_ROOT_X11)
JUMP_SIBDIRS_Xt = $(JUMP_ROOT_Xmu) $(JUMP_ROOT_Xext) \
	$(JUMP_ROOT_Xi) $(JUMP_ROOT_Xtst)
JUMP_DIR_Xt = $(JUMP_ROOT_Xt)/shared
JUMP_VARS_Xt = $(JUMP_ROOT_Xt)/jump_vars
JUMP_FUNCS_Xt = $(JUMP_ROOT_Xt)/jump_funcs
JUMP_IGNORE_Xt = $(JUMP_ROOT_Xt)/jump_ignore
JUMP_EXPORT_Xt = $(JUMP_DIR_Xt)/jump.vars
JUMP_IMPORT_Xt = $(JUMP_EXPORT_X11)
JUMP_ADDRESS_Xt = 0x602a0000
JUMP_JUMPTABLESIZE_Xt = 0x4000
JUMP_GOTSIZE_Xt = 4096
JUMP_STUBNAMES_Xt = libXt libXmu libXext libXi libXtst
JUMP_STUBS_IMPORT_Xt = $(JUMP_STUBS_IMPORT_X11)
JUMP_SIBARS_Xt = jump/libXmu.a~ jump/libXext.a~ jump/libXi.a~ jump/libXtst.a~
JUMP_LDLIBS_Xt = $(JUMP_SIBARS_Xt) $(JUMP_ROOT_ICE)/libICE.sa \
	$(JUMP_ROOT_SM)/libSM.sa $(JUMP_ROOT_X11)/libX11.sa $(JUMP_LDLIBS_libc)

XCOMM libXmu (part of libXt.so)
JUMP_ROOT_Xmu = $(XMUSRC)
JUMP_IS_HOST_Xmu = NO
JUMP_HOST_Xmu = $(JUMP_ROOT_Xt)
JUMP_DIR_Xmu = $(JUMP_DIR_Xt)

XCOMM libXext (part of libXt.so)
JUMP_ROOT_Xext = $(XEXTLIBSRC)
JUMP_IS_HOST_Xext = NO
JUMP_HOST_Xext = $(JUMP_ROOT_Xt)
JUMP_DIR_Xext = $(JUMP_DIR_Xt)

XCOMM libXi (part of libXt.so)
JUMP_ROOT_Xi = $(XILIBSRC)
JUMP_IS_HOST_Xi = NO
JUMP_HOST_Xi = $(JUMP_ROOT_Xt)
JUMP_DIR_Xi = $(JUMP_DIR_Xt)

XCOMM libXtst (part of libXt.so)
JUMP_ROOT_Xtst = $(XTESTLIBSRC)
JUMP_IS_HOST_Xtst = NO
JUMP_HOST_Xtst = $(JUMP_ROOT_Xt)
JUMP_DIR_Xtst = $(JUMP_DIR_Xt)

XCOMM libXaw.so (Xaw)
JUMP_ROOT_Xaw = $(AWIDGETSRC)
JUMP_IS_HOST_Xaw = YES
JUMP_STUBLIBS_Xaw = libXaw.sa
JUMP_SUBDIRS_Xaw = $(JUMP_ROOT_Xt)
JUMP_DIR_Xaw = $(JUMP_ROOT_Xaw)/shared
JUMP_VARS_Xaw = $(JUMP_ROOT_Xaw)/jump_vars
JUMP_FUNCS_Xaw = $(JUMP_ROOT_Xaw)/jump_funcs
JUMP_IGNORE_Xaw = $(JUMP_ROOT_Xaw)/jump_ignore
JUMP_EXPORT_Xaw = $(JUMP_DIR_Xaw)/jump.vars
JUMP_IMPORT_Xaw = $(JUMP_EXPORT_Xt) $(JUMP_EXPORT_X11)
JUMP_ADDRESS_Xaw = 0x60300000
JUMP_JUMPTABLESIZE_Xaw = 0x4000
JUMP_GOTSIZE_Xaw = 4096
JUMP_STUBNAMES_Xaw = libXaw
JUMP_STUBS_IMPORT_Xaw = $(JUMP_STUBS_IMPORT_X11)
JUMP_LDLIBS_Xaw = $(JUMP_ROOT_Xt)/libXt.sa $(JUMP_ROOT_Xt)/libXmu.sa \
	$(JUMP_ROOT_Xt)/libXext.sa $(JUMP_ROOT_X11)/libX11.sa \
	$(JUMP_LDLIBS_libc)

# libPEX.so (PEX5)
JUMP_ROOT_PEX5 = $(PEXLIBSRC)
JUMP_IS_HOST_PEX5 = YES
JUMP_STUBLIBS_PEX5 = libPEX5.sa
JUMP_SUBDIRS_PEX5 = $(JUMP_ROOT_X11)
JUMP_DIR_PEX5 = $(JUMP_ROOT_PEX5)/shared
JUMP_VARS_PEX5 = $(JUMP_ROOT_PEX5)/jump_vars
JUMP_FUNCS_PEX5 = $(JUMP_ROOT_PEX5)/jump_funcs
JUMP_IGNORE_PEX5 = $(JUMP_ROOT_PEX5)/jump_ignore
JUMP_EXPORT_PEX5 = $(JUMP_DIR_PEX5)/jump.vars
JUMP_IMPORT_PEX5 = $(JUMP_EXPORT_X11)
JUMP_ADDRESS_PEX5 = 0x60b00000
JUMP_JUMPTABLESIZE_PEX5 = 0x4000
JUMP_GOTSIZE_PEX5 = 4096
JUMP_STUBNAMES_PEX5 = libPEX5
JUMP_STUBS_IMPORT_PEX5 = $(JUMP_STUBS_IMPORT_X11) /usr/lib/libm.sa
JUMP_LDLIBS_PEX5 = $(JUMP_ROOT_X11)/libX11.sa $(JUMP_LDLIBS_libc) -lm

# libXIE.so (XIE)
JUMP_ROOT_XIE = $(XIELIBSRC)
JUMP_IS_HOST_XIE = YES
JUMP_STUBLIBS_XIE = libXIE.sa
JUMP_SUBDIRS_XIE = $(JUMP_ROOT_X11)
JUMP_DIR_XIE = $(JUMP_ROOT_XIE)/shared
JUMP_VARS_XIE = $(JUMP_ROOT_XIE)/jump_vars
JUMP_FUNCS_XIE = $(JUMP_ROOT_XIE)/jump_funcs
JUMP_IGNORE_XIE = $(JUMP_ROOT_XIE)/jump_ignore
JUMP_EXPORT_XIE = $(JUMP_DIR_XIE)/jump.vars
JUMP_IMPORT_XIE = $(JUMP_EXPORT_X11)
JUMP_ADDRESS_XIE = 0x60be0000
JUMP_JUMPTABLESIZE_XIE = 0x4000
JUMP_GOTSIZE_XIE = 4096
JUMP_STUBNAMES_XIE = libXIE
JUMP_STUBS_IMPORT_XIE = $(JUMP_STUBS_IMPORT_X11) /usr/lib/libm.sa
JUMP_LDLIBS_XIE = $(JUMP_ROOT_X11)/libX11.sa $(JUMP_LDLIBS_libc) -lm

XCOMM libFresco.so (Fresco, Xtf)
JUMP_ROOT_Fresco = $(FRESCOSRC)/src
JUMP_IS_HOST_Fresco = YES
JUMP_STUBLIBS_Fresco = libFresco.sa libXtf.sa
JUMP_SUBDIRS_Fresco = $(JUMP_ROOT_X11)
JUMP_SIBDIRS_Fresco = $(JUMP_ROOT_Xtf)
JUMP_DIR_Fresco = $(JUMP_ROOT_Fresco)/shared
JUMP_VARS_Fresco = $(JUMP_ROOT_Fresco)/jump_vars
JUMP_FUNCS_Fresco = $(JUMP_ROOT_Fresco)/jump_funcs
JUMP_IGNORE_Fresco = $(JUMP_ROOT_Fresco)/jump_ignore
JUMP_EXPORT_Fresco = $(JUMP_DIR_Fresco)/jump.vars
JUMP_IMPORT_Fresco = $(JUMP_EXPORT_X11)
JUMP_ADDRESS_Fresco = 0x60bc0000
JUMP_JUMPTABLESIZE_Fresco = 0x4000
JUMP_GOTSIZE_Fresco = 4096
JUMP_STUBNAMES_Fresco = libFresco libXtf
JUMP_STUBS_IMPORT_Fresco = $(JUMP_STUBS_IMPORT_X11)
JUMP_SIBARS_Fresco = jump/libXtf.a~
JUMP_LDLIBS_Fresco = $(JUMP_SIBARS_Fresco) $(JUMP_ROOT_X11)/libX11.sa \
	$(JUMP_LDLIBS_libc)

XCOMM libXtf (part of libFresco.so)
JUMP_ROOT_Xtf = $(XTFSRC)
JUMP_IS_HOST_Xtf = NO
JUMP_HOST_Xtf = $(JUMP_ROOT_Fresco)
JUMP_DIR_Xtf = $(JUMP_DIR_Fresco)

#endif /* !UseInstalled */

/*
 * SharedLibraryDataTarget - generate rules to create shared data file
 */
#ifndef SharedLibraryDataTarget
#define SharedLibraryDataTarget(libname,rev,salist)
#endif

/*
 * SharedLibraryTarget - generate rules to create a shared library;
 * There are two basic flavors of libs: self-generating, which create
 * their own (and possibly other) libs, and hosted, which rely on another
 * lib for all the work.
 */
#ifndef SharedLibraryTarget
#define SharedLibraryTarget(libname,rev,solist,down,up)			@@\
XCOMM This logic is such to compile the libs in their proper order,	@@\
XCOMM remain dependent on subsidiary libs, and yet minimize local work	@@\
									@@\
JUMP_DIR=./jump								@@\
JUMP_LIB=Concat(lib,libname)						@@\
									@@\
XCOMM  this is needed for newer gnumake versions			@@\
export JUMP_DIR JUMP_LIB						@@\
									@@\
JUMP_IS_HOST=$(Concat(JUMP_IS_HOST_,libname))				@@\
JUMP_AR=$(JUMP_DIR)/Concat(lib,libname.a~)				@@\
JUMP_SA=Concat(lib,libname.sa)						@@\
JUMP_SO=Concat(lib,libname.so.rev)					@@\
									@@\
JUMP_HOST=$(Concat(JUMP_HOST_,libname))					@@\
									@@\
INSTSOLIBFLAGS=-m 0555							@@\
									@@\
AllTarget($(BUILDLIBDIR)/$(JUMP_SA))					@@\
									@@\
$(BUILDLIBDIR)/$(JUMP_SA): $(JUMP_SA)					@@\
	LinkBuildLibrary($(JUMP_SA))					@@\
									@@\
$(JUMP_SA) $(Concat(JUMP_STUBLIBS_,libname)) do_JUMP_SA: \
		down/mk_JUMP_SA_$(JUMP_IS_HOST)				@@\
									@@\
down/mk_JUMP_SA_0:: mk_JUMP_HOST					@@\
									@@\
down/mk_JUMP_SA_0:: $(JUMP_HOST)/$(JUMP_SA)				@@\
	$(RM) $(JUMP_SA)						@@\
	$(LN) $(JUMP_HOST)/$(JUMP_SA) $(JUMP_SA)			@@\
	touch $@							@@\
									@@\
down/mk_JUMP_SA_1:: $(JUMP_SO)						@@\
									@@\
down/mk_JUMP_SA_1:: down/mk_JUMP_SO_2					@@\
	$(RM) $(Concat(JUMP_STUBLIBS_,libname))				@@\
	mkstubs -v rev -l $(JUMP_LIB) \
		-a $(Concat(JUMP_ADDRESS_,libname)) \
		-j $(Concat(JUMP_JUMPTABLESIZE_,libname)) \
		-g $(Concat(JUMP_GOTSIZE_,libname)) \
		-- $(Concat(JUMP_STUBNAMES_,libname))			@@\
	verify-shlib -l $(JUMP_SO) \
		$(Concat(JUMP_STUBLIBS_,libname))			@@\
	$(MV) verify.out $(JUMP_DIR)					@@\
	touch $@							@@\
									@@\
mk_JUMP_HOST:								@@\
	@echo checking stub library $(JUMP_SA) in $(JUMP_HOST)...	@@\
	@(cd $(JUMP_HOST); $(MAKE) $(MFLAGS) $(JUMP_SA)) || exit 1	@@\
	@echo ok. continuing in $(Concat(JUMP_ROOT_,libname))...	@@\
									@@\
$(JUMP_SO): down/mk_JUMP_SO_$(JUMP_IS_HOST)				@@\
									@@\
down/mk_JUMP_SO_0:							@@\
									@@\
down/mk_JUMP_SO_1:: $(JUMP_AR) mk_JUMP_SIBDIRS down/mk_JUMP_SO_2	@@\
									@@\
down/mk_JUMP_SO_2: down/mk_JUMP_AR $(Concat(JUMP_SIBARS_,libname))	@@\
	$(RM) $(JUMP_SO)						@@\
	mkimage -f -v rev -l $(JUMP_LIB) \
		-a $(Concat(JUMP_ADDRESS_,libname)) \
		-j $(Concat(JUMP_JUMPTABLESIZE_,libname)) \
		-g $(Concat(JUMP_GOTSIZE_,libname)) \
		-- $(JUMP_AR) $(Concat(JUMP_LDLIBS_,libname))		@@\
	$(RM) $(JUMP_DIR)/__jump.s $(JUMP_DIR)/__jump.o			@@\
	LinkBuildLibrary($(JUMP_SO))					@@\
	touch $@							@@\
									@@\
mk_JUMP_SIBDIRS:							@@\
	@for d in $(Concat(JUMP_SIBDIRS_,libname)); do \
		echo checking ar library in $$d...; \
		(cd $$d ; $(MAKE) $(MFLAGS) fastdo_JUMP_AR) || edit 1; \
		echo ok. continuing in $(Concat(JUMP_ROOT_,libname))...;done@@\
									@@\
fastdo_JUMP_AR: $(JUMP_DIR) down/mk_JUMP_AR				@@\
									@@\
$(JUMP_AR) do_JUMP_AR:: jumpsetup down/mk_JUMP_AR			@@\
									@@\
jumpsetup: $(JUMP_DIR) jumpsetup_$(JUMP_IS_HOST)			@@\
									@@\
$(JUMP_DIR):								@@\
	$(RM) jump							@@\
	LibMkdir($(Concat(JUMP_DIR_,libname)))				@@\
	$(LN) $(Concat(JUMP_DIR_,libname)) jump				@@\
									@@\
jumpsetup_0:								@@\
	@echo doing jump setup in host $(JUMP_HOST)...			@@\
	@(cd $(JUMP_HOST); $(MAKE) $(MFLAGS) jumpsetup) || exit 1	@@\
	@echo ok. continuing in $(Concat(JUMP_ROOT_,libname))...	@@\
									@@\
jumpsetup_1::								@@\
	@for d in $(Concat(JUMP_SUBDIRS_,libname)); do \
		echo checking stub library in $$d...; \
		(cd $$d ; $(MAKE) $(MFLAGS) do_JUMP_SA) || exit 1; \
		echo ok. continuing in $(Concat(JUMP_ROOT_,libname))...;done@@\
									@@\
jumpsetup_1:: $(JUMP_DIR)/jump.funcs $(JUMP_DIR)/jump.vars \
	$(JUMP_DIR)/jump.ignore $(JUMP_DIR)/jump.import			@@\
									@@\
$(JUMP_DIR)/jump.funcs: $(Concat(JUMP_FUNCS_,libname))			@@\
	$(RM) $(JUMP_DIR)/jump.funcs					@@\
	cat $(Concat(JUMP_FUNCS_,libname)) | \
		$(CPP) $(ALLDEFINES) $(Concat(JUMP_DEFS_,libname)) > $@	@@\
									@@\
$(JUMP_DIR)/jump.vars: $(Concat(JUMP_VARS_,libname))			@@\
	$(RM) $(JUMP_DIR)/jump.vars					@@\
	cat $(Concat(JUMP_VARS_,libname)) | \
		$(CPP) $(ALLDEFINES) $(Concat(JUMP_DEFS_,libname)) > $@	@@\
									@@\
$(JUMP_DIR)/jump.ignore: $(Concat(JUMP_IGNORE_,libname))		@@\
	$(RM) $(JUMP_DIR)/jump.ignore					@@\
	cat $(Concat(JUMP_IGNORE_,libname)) | \
		$(CPP) $(ALLDEFINES) $(Concat(JUMP_DEFS_,libname)) > $@	@@\
									@@\
$(JUMP_DIR)/jump.import: $(JUMP_DIR)/stubs.import \
		$(Concat(JUMP_IMPORT_,libname))				@@\
	$(RM) $(JUMP_DIR)/jump.import					@@\
	cat $(JUMP_DIR)/stubs.import $(Concat(JUMP_IMPORT_,libname)) > $@ @@\
									@@\
$(JUMP_DIR)/stubs.import: $(Concat(JUMP_STUBS_IMPORT_,libname))		@@\
	$(RM) $(JUMP_DIR)/stubs.import					@@\
	nm --no-cplus $(Concat(JUMP_STUBS_IMPORT_,libname)) | grep '__GOT__' | \
		sed 's/__GOT__/_/' > $@					@@\
									@@\
down/mk_JUMP_AR: solist							@@\
	$(RM) $(JUMP_AR)						@@\
	@if [ -s $(JUMP_DIR)/jump.log ]; then \
		echo "Error: Leftover globals for shared lib"; \
		exit 1; fi						@@\
	(cd down; $(AR) up/$(JUMP_AR) solist) || exit 1			@@\
	$(RANLIB) $(JUMP_AR)						@@\
	touch $@							@@\
									@@\
clean:: jumpclean							@@\
									@@\
jumpclean: jumpclean_$(JUMP_IS_HOST)					@@\
	$(RM) $(JUMP_SA) down/mk_JUMP_AR				@@\
	$(RM) -r $(JUMP_DIR)						@@\
									@@\
jumpclean_0:								@@\
	$(RM) down/mk_JUMP_SA_0						@@\
	$(RM) $(JUMP_HOST)/$(JUMP_SA)					@@\
									@@\
jumpclean_1:								@@\
	$(RM) -r $(JUMP_SO) $(Concat(JUMP_DIR_,libname)) \		@@\
		down/mk_JUMP_SA_1 down/mk_JUMP_SO_1 down/mk_JUMP_SO_2
#endif /* SharedLibraryTarget */

/*
 * InstallSharedLibrary - generate rules to install the shared library.
 */
#ifndef InstallSharedLibrary
#define	InstallSharedLibrary(libname,rev,dest)				@@\
install:: $(JUMP_SA) $(JUMP_SO)						@@\
	MakeDir($(DESTDIR)dest)						@@\
	@if [ "$(JUMP_IS_HOST)" = YES ]; then \
		(T=$(DESTDIR)dest/`echo $(JUMP_SO)|sed 's/\.[^\.]*$$//'`;\
		set -x; \
		$(INSTALL) -s -c $(INSTSOLIBFLAGS) $(JUMP_SO) $(DESTDIR)dest; \
		$(RM) $$T && $(LN) $(JUMP_SO) $$T); fi			@@\
	$(INSTALL) -c $(INSTLIBFLAGS) $(JUMP_SA) $(DESTDIR)dest
#endif /* InstallSharedLibrary */

/*
 * InstallSharedLibraryData - generate rules to install the shared library data
 */
#ifndef InstallSharedLibraryData
#define	InstallSharedLibraryData(libname,rev,dest)
#endif /* InstallSharedLibraryData */

#endif /* UseElfFormat */