head	1.5;
access;
symbols
	netbsd-5-2-3-RELEASE:1.5
	netbsd-5-1-5-RELEASE:1.5
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.5
	riastradh-drm2-base:1.5
	netbsd-5-2-2-RELEASE:1.5
	netbsd-5-1-4-RELEASE:1.5
	netbsd-5-2-1-RELEASE:1.5
	netbsd-5-1-3-RELEASE:1.5
	netbsd-5-2:1.5.0.8
	netbsd-5-2-RELEASE:1.5
	netbsd-5-2-RC1:1.5
	netbsd-5-1-2-RELEASE:1.5
	netbsd-5-1-1-RELEASE:1.5
	netbsd-5-1:1.5.0.6
	netbsd-5-1-RELEASE:1.5
	netbsd-5-1-RC4:1.5
	netbsd-5-1-RC3:1.5
	netbsd-5-1-RC2:1.5
	netbsd-5-1-RC1:1.5
	netbsd-5-0-2-RELEASE:1.5
	netbsd-5-0-1-RELEASE:1.5
	netbsd-5-0:1.5.0.4
	netbsd-5-0-RELEASE:1.5
	netbsd-5-0-RC4:1.5
	netbsd-5-0-RC3:1.5
	netbsd-5-0-RC2:1.5
	netbsd-5-0-RC1:1.5
	netbsd-5:1.5.0.2
	netbsd-5-base:1.5
	netbsd-2-0-3-RELEASE:1.4
	netbsd-2-1:1.4.0.8
	netbsd-2-1-RELEASE:1.4
	netbsd-2-1-RC6:1.4
	netbsd-2-1-RC5:1.4
	netbsd-2-1-RC4:1.4
	netbsd-2-1-RC3:1.4
	netbsd-2-1-RC2:1.4
	netbsd-2-1-RC1:1.4
	netbsd-2-0-2-RELEASE:1.4
	netbsd-2-0-1-RELEASE:1.4
	netbsd-2:1.4.0.6
	netbsd-2-base:1.4
	netbsd-2-0-RELEASE:1.4
	netbsd-2-0-RC5:1.4
	netbsd-2-0-RC4:1.4
	netbsd-2-0-RC3:1.4
	netbsd-2-0-RC2:1.4
	netbsd-2-0-RC1:1.4
	netbsd-2-0:1.4.0.4
	netbsd-2-0-base:1.4
	netbsd-1-6-PATCH002-RELEASE:1.4
	netbsd-1-6-PATCH002:1.4
	netbsd-1-6-PATCH002-RC4:1.4
	netbsd-1-6-PATCH002-RC3:1.4
	netbsd-1-6-PATCH002-RC2:1.4
	netbsd-1-6-PATCH002-RC1:1.4
	netbsd-1-6:1.4.0.2
	netbsd-1-6-base:1.4
	netbsd-1-6-PATCH001:1.4
	netbsd-1-6-RELEASE:1.4
	netbsd-1-5-PATCH003:1.4
	netbsd-1-5-PATCH002:1.4
	netbsd-1-5-PATCH001:1.4
	xf-3_3-branch-2001-03-05:1.1.1.4
	netbsd-1-5-RELEASE:1.4
	netbsd-1-4-PATCH003:1.4
	netbsd-1-4-PATCH002:1.4
	v3-3-6:1.1.1.4
	comdex-fall-1999:1.4
	v3-3-5:1.1.1.4
	v3-3-4:1.1.1.4
	netbsd-1-4-PATCH001:1.3
	netbsd-1-4-RELEASE:1.2
	v3-3-3-1:1.1.1.3
	netbsd-1-3-PATCH003:1.2
	v3-3-3:1.1.1.3
	pre-xf86-3-3-3-import:1.1.1.2
	netbsd-1-3-PATCH002:1.1.1.2
	v3-3-2:1.1.1.2
	netbsd-1-3-RELEASE:1.1.1.2
	v3-3-1:1.1.1.2
	v3-3:1.1.1.2
	v3-2:1.1.1.1
	XF86:1.1.1;
locks; strict;
comment	@# @;


1.5
date	2005.01.07.18.51.36;	author tron;	state dead;
branches;
next	1.4;

1.4
date	99.07.20.23.37.09;	author tron;	state Exp;
branches;
next	1.3;

1.3
date	99.06.19.15.19.17;	author mrg;	state Exp;
branches;
next	1.2;

1.2
date	98.12.08.03.44.22;	author mrg;	state Exp;
branches;
next	1.1;

1.1
date	97.03.15.06.08.23;	author scottr;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	97.03.15.06.08.23;	author scottr;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	97.06.30.12.32.20;	author mrg;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	98.11.23.15.33.00;	author veego;	state Exp;
branches;
next	1.1.1.4;

1.1.1.4
date	99.07.20.17.41.57;	author veego;	state Exp;
branches;
next	;


desc
@@


1.5
log
@EOL of XFree86 3.3.6, approved by core@@NetBSD.org
@
text
@XCOMM $XConsortium: bsdLib.rules /main/3 1996/09/28 16:09:18 rws $





XCOMM $XFree86: xc/config/cf/bsdLib.rules,v 3.4.2.7 1999/07/17 01:32:44 dawes Exp $
/*
 * NetBSD/FreeBSD shared library rules
 */

#ifndef UseElfFormat
#define UseElfFormat NO
#endif

#if !UseElfFormat
/* a.out shared libs */
#ifndef HasSharedLibraries
#define HasSharedLibraries YES
#endif
#ifndef SharedDataSeparation
#define SharedDataSeparation NO
#endif
#ifndef SharedCodeDef
#define SharedCodeDef
#endif
#ifndef SharedLibraryDef
#define SharedLibraryDef -DBSDSHLIB
#endif
#ifndef ShLibIncludeFile
#define ShLibIncludeFile <bsdLib.tmpl>
#endif
#ifndef SharedLibraryLoadFlags
#define SharedLibraryLoadFlags -Bshareable -R$(USRLIBDIR)
#endif
#ifndef PositionIndependentCFlags
#define PositionIndependentCFlags -fpic
#endif

/*
 * InstallSharedLibrary - generate rules to install the shared library.
 */
#ifndef InstallSharedLibrary
#define InstallSharedLibrary(libname,rev,dest)				@@@@\
install:: Concat(lib,libname.so.rev)					@@@@\
	MakeDir($(DESTDIR)dest)						@@@@\
	$(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest 
@@@@\

#endif /* InstallSharedLibrary */

/*
 * 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 $(EXTRALIBRARYDEPS)			@@@@\
	$(RM) $@@~							@@@@\
	(cd down; $(LD) -o up/$@@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@@@\
	$(RM) $@@							@@@@\
	$(MV) $@@~ $@@							@@@@\
	LinkBuildLibrary($@@)						@@@@\
									@@@@\
clean::									@@@@\
	$(RM) Concat(lib,libname.so.rev)

#endif /* SharedLibraryTarget */

#ifndef SharedDepModuleTarget
#define SharedDepModuleTarget(name,deps,solist)				@@@@\
AllTarget(name)								@@@@\
									@@@@\
name: deps								@@@@\
	$(RM) $@@~							@@@@\
	$(LD) -o $@@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)		@@@@\
	$(RM) $@@							@@@@\
	$(MV) $@@~ $@@							@@@@\
									@@@@\
clean::									@@@@\
	$(RM) name

#endif /* SharedDepModuleTarget */

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

#ifndef InstallSharedLibraryData
#define InstallSharedLibraryData(libname,rev,dest)
#endif /* InstallSharedLibraryData */

/*
 * SharedLibReferences - variables for shared libraries
 */
#ifndef SharedLibReferences
#define SharedLibReferences(varname,libname,libsource,revname,rev)	@@@@\
revname = rev								@@@@\
Concat3(DEP,varname,LIB) = SharedLibDependencies(libname,libsource,revname) @@@@\
Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname)		@@@@\
LintLibReferences(varname,libname,libsource)
#endif

/*
 * SharedDSLibReferences - variables for shared libraries
 */
#ifndef SharedDSLibReferences
#define SharedDSLibReferences(varname,libname,libsource,revname,rev)	@@@@\
revname = rev								@@@@\
Concat3(DEP,varname,LIB) = SharedDSLibDependencies(libname,libsource,revname) @@@@\
Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) Concat3(Shared,libname,Reqs)		@@@@\
LintLibReferences(varname,libname,libsource)
#endif

#else /* UseElfFormat */

/*
 * NetBSD/FreeBSD (ELF) shared library rules
 * Cloned from Linux ELF rules, with the following major change:
 *
 * 	Shared libraries depend on -lc.  Since we don't have to worry
 *	about libc vs. libg, etc., this is a good idea.  (This is actually
 *	implied by using $(CC) to build the shared libraries.)
 */

#ifndef HasSharedLibraries
#define HasSharedLibraries YES
#endif
#ifndef ForceNormalLib
#define ForceNormalLib YES
#endif

#ifndef BaseShLibReqs
#define BaseShLibReqs		/* -lc implied by $(CC) */
#endif

#ifndef SharedDataSeparation
#define SharedDataSeparation NO
#endif
#ifndef SharedCodeDef
#define SharedCodeDef /**/
#endif
#ifndef SharedLibraryDef
#define SharedLibraryDef /**/
#endif
#ifndef ShLibIncludeFile
#define ShLibIncludeFile <bsdLib.tmpl>
#endif
#ifndef SharedLibraryLoadFlags
#define SharedLibraryLoadFlags -shared -Wl,-rpath,$(USRLIBDIR) -Wl,-rpath,$(XPROJECTROOT)/lib
#endif
#ifndef PositionIndependentCFlags
#define PositionIndependentCFlags -fPIC
#endif
#ifndef PositionIndependentCplusplusFlags
#define PositionIndependentCplusplusFlags -fPIC
#endif
#ifndef ExtraLoadFlags
#ifdef UseInstalled
#define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH) -Wl,-rpath,$(XPROJECTROOT)/lib
#else
#define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH) -Wl,-rpath-link,$(BUILDLIBDIR) -Wl,-rpath,$(XPROJECTROOT)/lib
#endif
#endif

/*
 * InstallSharedLibrary - generate rules to install the shared library.
 * NOTE: file must be executable, hence "INSTBINFLAGS"
 */
#ifndef FreeBSDArchitecture
#ifndef InstallSharedLibrary
#define InstallSharedLibrary(libname,rev,dest)				@@@@\
install:: Concat(lib,libname.so.rev) 					@@@@\
	MakeDir($(DESTDIR)dest)						@@@@\
	$(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@@@\
	@@T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`;\	@@@@\
	  set -x; $(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T	@@@@\
	$(RM) Concat($(DESTDIR)dest/lib,libname.so)			@@@@\
	$(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)
#endif /* InstallSharedLibrary */
#else
/* FreeBSD version */
#ifndef InstallSharedLibrary
#define InstallSharedLibrary(libname,rev,dest)				@@@@\
install:: Concat(lib,libname.so.rev) 					@@@@\
	MakeDir($(DESTDIR)dest)						@@@@\
	@@T=`echo Concat(lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`;\	@@@@\
	  set -x;\							@@@@\
	  $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest/$$T;\	@@@@\
	  $(RM) Concat($(DESTDIR)dest/lib,libname.so);\			@@@@\
	  $(LN) $$T Concat($(DESTDIR)dest/lib,libname.so)
#endif /* InstallSharedLibrary */
#endif /* FreeBSDArchitecture */

/*
 * 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
#ifdef UseInstalled  
#define LinkBuildSonameLibrary(lib) true
#else
#define LinkBuildSonameLibrary(lib) (RemoveFile($(BUILDLIBDIR)/lib); \
	cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/lib .)
#endif

#define SharedLibraryTarget(libname,rev,solist,down,up)			@@@@\
AllTarget(Concat(lib,libname.so.rev))					@@@@\
									@@@@\
Concat(lib,libname.so.rev):  solist					@@@@\
	$(RM) $@@~							@@@@\
	@@SONAME=`echo $@@ | sed 's/\.[^\.]*$$//'`; set -x; \		@@@@\
		(cd down; $(CC) -o up/$@@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@@@\
		$(RM) $$SONAME; $(LN) $@@ $$SONAME; \			@@@@\
		LinkBuildSonameLibrary($$SONAME)			@@@@\
	$(RM) $@@							@@@@\
	$(MV) $@@~ $@@							@@@@\
	$(RM) Concat(lib,libname.so)					@@@@\
	$(LN) $@@ Concat(lib,libname.so)					@@@@\
	LinkBuildLibrary($@@)						@@@@\
	LinkBuildLibrary(Concat(lib,libname.so))			@@@@\
									@@@@\
clean::									@@@@\
	@@SONAME=`echo Concat(lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`; \ @@@@\
	set -x; $(RM) $$SONAME						@@@@\
	$(RM) Concat(lib,libname.so)					@@@@\
	$(RM) Concat(lib,libname.so.rev)

#endif /* SharedLibraryTarget */

#ifndef SharedDepModuleTarget
#define SharedDepModuleTarget(name,deps,solist)				@@@@\
AllTarget(name)								@@@@\
									@@@@\
name: deps								@@@@\
	$(RM) $@@~							@@@@\
	$(CC) -o $@@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)		@@@@\
	$(RM) $@@							@@@@\
	$(MV) $@@~ $@@							@@@@\
									@@@@\
clean::									@@@@\
	$(RM) name

#endif /* SharedDepModuleTarget */

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

#if defined(FreeBSDArchitecture)

/*
 * Support for building a.out compatibility libraries on a FreeBSD/ELF system.
 */
#ifndef BuildAoutLibraries
#define BuildAoutLibraries NO
#endif

#if BuildAoutLibraries

#define ExtraLibRules

#ifndef AoutSharedLibraryDef
#define AoutSharedLibraryDef -DBSDSHLIB -DAOUT_COMPAT_LIB
#endif
#ifndef AoutSharedLibraryLoadFlags
#define AoutSharedLibraryLoadFlags -aout -Bshareable
#endif
#ifndef AoutPositionIndependentCFlags
#define AoutPositionIndependentCFlags -fpic
#endif

/*
 * InstallAoutSharedLibrary - generate rules to install the shared library.
 */
#ifndef InstallAoutSharedLibrary
#define InstallAoutSharedLibrary(libname,rev,dest)			@@@@\
install:: Concat(aout/lib,libname.so.rev)				@@@@\
	MakeDir($(DESTDIR)dest)						@@@@\
	$(INSTALL) -c $(INSTLIBFLAGS) Concat(aout/lib,libname.so.rev) $(DESTDIR)dest 
@@@@\

#endif /* InstallAoutSharedLibrary */

/*
 * AoutSharedLibraryTarget - 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 AoutSharedLibraryTarget
#define AoutSharedLibraryTarget(libname,rev,solist,down,up)		@@@@\
AllTarget(Concat(down/lib,libname.so.rev))				@@@@\
									@@@@\
Concat(down/lib,libname.so.rev):  solist $(EXTRALIBRARYDEPS)		@@@@\
	$(RM) $@@~							@@@@\
	(cd down; $(LD) -o up/$@@~ AoutSharedLibraryLoadFlags solist)	@@@@\
	$(RM) $@@							@@@@\
	$(MV) $@@~ $@@							@@@@\
									@@@@\
clean::									@@@@\
	$(RM) Concat(down/lib,libname.so.rev)

#endif /* AoutSharedLibraryTarget */

#define AoutCDebugFlags -aout DefaultCDebugFlags
#define AoutCplusplusDebugFlags -aout DefaultCplusplusDebugFlags

#define AoutLibObjCompile(options) LibObjCompile(aout,AoutCDebugFlags AoutSharedLibraryDef AoutPositionIndependentCFlags options)
#define AoutLibObjCplusplusCompile(options) LibObjCompile(aout,AoutCplusplusDebugFlags options)

#define ExtraLibMkdir() _LibMkdir(aout)
#define ExtraObjCompile(options) AoutLibObjCompile(options)
#define ExtraObjCplusplusCompile(options) AoutLibObjCplusplusCompile(options)
#define ExtraCleanDir() LibCleanDir(aout)

#define ExtraLibraryTarget(libname,so,objs) AoutSharedLibraryTarget(libname,so,objs,aout,..)
#define ExtraInstallLibrary(libname,so) InstallAoutSharedLibrary(libname,so,$(SHLIBDIR)/aout)

#endif
#endif

#endif /* UseElfFormat */
@


1.4
log
@Resolv conflicts from XFree86 3.3.4 import.
@
text
@@


1.3
log
@also search XPROJECTROOT/lib for libraries at runtime, as well as USRLIBDIR.  fixes more xpkgwedge lossage.
@
text
@d7 1
a7 1
XCOMM $XFree86: xc/config/cf/bsdLib.rules,v 3.4.2.6 1998/11/08 11:49:53 dawes Exp $
d282 1
a282 1
#define AoutSharedLibraryDef -DBSDSHLIB
@


1.2
log
@link shared libraries with -R also.
@
text
@d156 1
a156 1
#define SharedLibraryLoadFlags -shared -Wl,-rpath,$(USRLIBDIR)
d166 1
a166 1
#define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH)
d168 1
a168 1
#define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH) -Wl,-rpath-link,$(BUILDLIBDIR)
@


1.1
log
@Initial revision
@
text
@d1 1
a1 1
XCOMM $XConsortium: bsdLib.rules /main/2 1996/01/24 06:38:15 kaleb $
d7 1
a7 1
XCOMM $XFree86: xc/config/cf/bsdLib.rules,v 3.2 1996/10/03 08:28:08 dawes Exp $
d12 6
d34 1
a34 1
#define SharedLibraryLoadFlags -Bshareable
d53 2
a54 2
 * NormalSharedLibraryTarget - generate rules to create a shared library;
 * build it into a different name so that the we do not hose people by having
d61 1
a61 1
Concat(lib,libname.so.rev):  solist					@@@@\
d120 221
@


1.1.1.1
log
@XFree86 3.2 sources
@
text
@@


1.1.1.2
log
@XFree86 3.3 sources.
@
text
@d1 1
a1 1
XCOMM $XConsortium: bsdLib.rules /main/3 1996/09/28 16:09:18 rws $
d7 1
a7 1
XCOMM $XFree86: xc/config/cf/bsdLib.rules,v 3.4.2.1 1997/05/11 05:04:04 dawes Exp $
a11 6
#ifndef UseElfFormat
#define UseElfFormat NO
#endif

#if !UseElfFormat
/* a.out shared libs */
d47 2
a48 2
 * SharedLibraryTarget - generate rules to create a shared library;
 * build it into a different name so that we do not hose people by having
d55 1
a55 1
Concat(lib,libname.so.rev):  solist $(EXTRALIBRARYDEPS)			@@@@\
a113 119

#else /* UseElfFormat */

/*
 * NetBSD/FreeBSD (ELF) shared library rules
 * Cloned from Linux ELF rules, with the following major change:
 *
 * 	Shared libraries depend on -lc.  Since we don't have to worry
 *	about libc vs. libg, etc., this is a good idea.  (This is actually
 *	implied by using $(CC) to build the shared libraries.)
 */

#ifndef HasSharedLibraries
#define HasSharedLibraries YES
#endif
#ifndef ForceNormalLib
#define ForceNormalLib YES
#endif

#ifndef BaseShLibReqs
#define BaseShLibReqs		/* -lc implied by $(CC) */
#endif

#ifndef SharedDataSeparation
#define SharedDataSeparation NO
#endif
#ifndef SharedCodeDef
#define SharedCodeDef /**/
#endif
#ifndef SharedLibraryDef
#define SharedLibraryDef /**/
#endif
#ifndef ShLibIncludeFile
#define ShLibIncludeFile <bsdLib.tmpl>
#endif
#ifndef SharedLibraryLoadFlags
#define SharedLibraryLoadFlags -shared -Wl,-rpath,$(USRLIBDIR)
#endif
#ifndef PositionIndependentCFlags
#define PositionIndependentCFlags -fPIC
#endif
#ifndef PositionIndependentCplusplusFlags
#define PositionIndependentCplusplusFlags -fPIC
#endif
#ifndef ExtraLoadFlags
#ifdef UseInstalled
#define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH)
#else
#define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH) -Wl,-rpath-link,$(BUILDLIBDIR)
#endif
#endif

/*
 * InstallSharedLibrary - generate rules to install the shared library.
 * NOTE: file must be executable, hence "INSTBINFLAGS"
 */
#ifndef InstallSharedLibrary
#define InstallSharedLibrary(libname,rev,dest)				@@@@\
install:: Concat(lib,libname.so.rev) 					@@@@\
	MakeDir($(DESTDIR)dest)						@@@@\
	$(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@@@\
	(T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`;\
		$(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T)	@@@@\
	(T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\.so.*$$/.so/'`;\
		$(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T)	@@@@\
	$(RM) Concat($(DESTDIR)dest/lib,libname.so)			@@@@\
	$(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)
#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
#ifdef UseInstalled  
#define LinkBuildSonameLibrary(lib) true
#else
#define LinkBuildSonameLibrary(lib) (RemoveFile($(BUILDLIBDIR)/lib); \
	cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/lib .)
#endif

#define SharedLibraryTarget(libname,rev,solist,down,up)			@@@@\
AllTarget(Concat(lib,libname.so.rev))					@@@@\
									@@@@\
Concat(lib,libname.so.rev):  solist					@@@@\
	$(RM) $@@~							@@@@\
	SONAME=`echo $@@ | sed 's/\.[^\.]*$$//'`; \			@@@@\
		(cd down; $(CC) -o up/$@@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@@@\
		$(RM) $$SONAME; $(LN) $@@ $$SONAME; \			@@@@\
		LinkBuildSonameLibrary($$SONAME)			@@@@\
	$(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)

#endif /* SharedLibraryTarget */

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

#endif /* UseElfFormat */
@


1.1.1.3
log
@XFree86 3.3.3 sources
@
text
@d7 1
a7 1
XCOMM $XFree86: xc/config/cf/bsdLib.rules,v 3.4.2.6 1998/11/08 11:49:53 dawes Exp $
a175 1
#ifndef FreeBSDArchitecture
d181 4
a184 2
	@@T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`;\	@@@@\
	  set -x; $(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T	@@@@\
a187 13
#else
/* FreeBSD version */
#ifndef InstallSharedLibrary
#define InstallSharedLibrary(libname,rev,dest)				@@@@\
install:: Concat(lib,libname.so.rev) 					@@@@\
	MakeDir($(DESTDIR)dest)						@@@@\
	@@T=`echo Concat(lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`;\	@@@@\
	  set -x;\							@@@@\
	  $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest/$$T;\	@@@@\
	  $(RM) Concat($(DESTDIR)dest/lib,libname.so);\			@@@@\
	  $(LN) $$T Concat($(DESTDIR)dest/lib,libname.so)
#endif /* InstallSharedLibrary */
#endif /* FreeBSDArchitecture */
d215 1
a215 1
	@@SONAME=`echo $@@ | sed 's/\.[^\.]*$$//'`; set -x; \		@@@@\
a226 3
	@@SONAME=`echo Concat(lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`; \ @@@@\
	set -x; $(RM) $$SONAME						@@@@\
	$(RM) Concat(lib,libname.so)					@@@@\
a230 15
#ifndef SharedDepModuleTarget
#define SharedDepModuleTarget(name,deps,solist)				@@@@\
AllTarget(name)								@@@@\
									@@@@\
name: deps								@@@@\
	$(RM) $@@~							@@@@\
	$(CC) -o $@@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)		@@@@\
	$(RM) $@@							@@@@\
	$(MV) $@@~ $@@							@@@@\
									@@@@\
clean::									@@@@\
	$(RM) name

#endif /* SharedDepModuleTarget */

a236 72

#if defined(FreeBSDArchitecture)

/*
 * Support for building a.out compatibility libraries on a FreeBSD/ELF system.
 */
#ifndef BuildAoutLibraries
#define BuildAoutLibraries NO
#endif

#if BuildAoutLibraries

#define ExtraLibRules

#ifndef AoutSharedLibraryDef
#define AoutSharedLibraryDef -DBSDSHLIB
#endif
#ifndef AoutSharedLibraryLoadFlags
#define AoutSharedLibraryLoadFlags -aout -Bshareable
#endif
#ifndef AoutPositionIndependentCFlags
#define AoutPositionIndependentCFlags -fpic
#endif

/*
 * InstallAoutSharedLibrary - generate rules to install the shared library.
 */
#ifndef InstallAoutSharedLibrary
#define InstallAoutSharedLibrary(libname,rev,dest)			@@@@\
install:: Concat(aout/lib,libname.so.rev)				@@@@\
	MakeDir($(DESTDIR)dest)						@@@@\
	$(INSTALL) -c $(INSTLIBFLAGS) Concat(aout/lib,libname.so.rev) $(DESTDIR)dest 
@@@@\

#endif /* InstallAoutSharedLibrary */

/*
 * AoutSharedLibraryTarget - 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 AoutSharedLibraryTarget
#define AoutSharedLibraryTarget(libname,rev,solist,down,up)		@@@@\
AllTarget(Concat(down/lib,libname.so.rev))				@@@@\
									@@@@\
Concat(down/lib,libname.so.rev):  solist $(EXTRALIBRARYDEPS)		@@@@\
	$(RM) $@@~							@@@@\
	(cd down; $(LD) -o up/$@@~ AoutSharedLibraryLoadFlags solist)	@@@@\
	$(RM) $@@							@@@@\
	$(MV) $@@~ $@@							@@@@\
									@@@@\
clean::									@@@@\
	$(RM) Concat(down/lib,libname.so.rev)

#endif /* AoutSharedLibraryTarget */

#define AoutCDebugFlags -aout DefaultCDebugFlags
#define AoutCplusplusDebugFlags -aout DefaultCplusplusDebugFlags

#define AoutLibObjCompile(options) LibObjCompile(aout,AoutCDebugFlags AoutSharedLibraryDef AoutPositionIndependentCFlags options)
#define AoutLibObjCplusplusCompile(options) LibObjCompile(aout,AoutCplusplusDebugFlags options)

#define ExtraLibMkdir() _LibMkdir(aout)
#define ExtraObjCompile(options) AoutLibObjCompile(options)
#define ExtraObjCplusplusCompile(options) AoutLibObjCplusplusCompile(options)
#define ExtraCleanDir() LibCleanDir(aout)

#define ExtraLibraryTarget(libname,so,objs) AoutSharedLibraryTarget(libname,so,objs,aout,..)
#define ExtraInstallLibrary(libname,so) InstallAoutSharedLibrary(libname,so,$(SHLIBDIR)/aout)

#endif
#endif
@


1.1.1.4
log
@XFree86 3.3.4 sources
@
text
@d7 1
a7 1
XCOMM $XFree86: xc/config/cf/bsdLib.rules,v 3.4.2.7 1999/07/17 01:32:44 dawes Exp $
d282 1
a282 1
#define AoutSharedLibraryDef -DBSDSHLIB -DAOUT_COMPAT_LIB
@


