diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-14 16:48:20 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-14 16:48:20 +0000 |
commit | 272f68b2bffd736cede856a96231afe237261c8d (patch) | |
tree | 735f02d872ec1c4e704c26240c1755b81565b5cb /sv4Lib.rules | |
parent | 978fce56ab5d93678618fad722f69c464df12c3f (diff) |
XFree86 4.3.0.1xf86-4_3_0_1PRE_xf86-4_3_0_1
Diffstat (limited to 'sv4Lib.rules')
-rw-r--r-- | sv4Lib.rules | 77 |
1 files changed, 70 insertions, 7 deletions
diff --git a/sv4Lib.rules b/sv4Lib.rules index 9aa1ed2..1d13eb9 100644 --- a/sv4Lib.rules +++ b/sv4Lib.rules @@ -4,12 +4,17 @@ XCOMM $Xorg: sv4Lib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ * SVR4 shared library rules */ +XCOMM $XFree86: xc/config/cf/sv4Lib.rules,v 3.9 2002/11/22 22:55:56 tsi Exp $ + #ifndef HasSharedLibraries # define HasSharedLibraries YES #endif #ifndef SharedDataSeparation # define SharedDataSeparation NO #endif +#ifndef HasGcc2ForCplusplus +# define HasGcc2ForCplusplus HasGcc2 +#endif #ifndef SharedCodeDef # define SharedCodeDef /**/ #endif @@ -24,14 +29,14 @@ XCOMM $Xorg: sv4Lib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ #endif #ifndef PositionIndependentCFlags # if HasGcc2 -# define PositionIndependentCFlags -fpic +# define PositionIndependentCFlags -fPIC # else # define PositionIndependentCFlags -K PIC # endif #endif #ifndef PositionIndependentCplusplusFlags # if HasGcc2ForCplusplus -# define PositionIndependentCplusplusFlags -fpic +# define PositionIndependentCplusplusFlags -fPIC # else # define PositionIndependentCplusplusFlags -K PIC # endif @@ -39,17 +44,34 @@ XCOMM $Xorg: sv4Lib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ #ifndef UseExportLists # define UseExportLists NO #endif +#ifndef StripInstalledPrograms +# define StripInstalledPrograms NO +#endif /* * InstallSharedLibrary - generate rules to install the shared library. */ #ifndef InstallSharedLibrary +#if StripInstalledPrograms +# define InstallSharedLibrary(libname,rev,dest) @@\ +install:: Concat(lib,libname.so.rev) @@\ + MakeDir($(DESTDIR)dest) @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\ + mcs -d Concat($(DESTDIR)dest/lib,libname.so.rev) @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\ + cd $(DESTDIR)dest; \ @@\ + $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so)); fi +#else # define InstallSharedLibrary(libname,rev,dest) @@\ install:: Concat(lib,libname.so.rev) @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\ - $(RM) Concat($(DESTDIR)dest/lib,libname.so) @@\ - cd $(DESTDIR)dest; $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so) + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\ + cd $(DESTDIR)dest; \ @@\ + $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so)); fi +#endif #endif /* InstallSharedLibrary */ @@ -91,10 +113,11 @@ Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\ LinkWithExports(libname,rev,solist,down,up) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ - $(RM) Concat(lib,libname.so) @@\ - $(LN) $@ Concat(lib,libname.so) @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat(lib,libname.so); \ @@\ + $(LN) $@ Concat(lib,libname.so)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibrary(Concat(lib,libname.so)) @@\ + LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) @@ -102,6 +125,46 @@ clean:: @@\ #endif /* SharedLibraryTarget */ /* + * SharedDepLibraryTarget - generate rules to create a shared library. + */ +#ifndef SharedDepLibraryTarget +# define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\ +AllTarget(Concat(lib,libname.so.rev)) @@\ + @@\ +Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ + $(RM) $@~ @@\ + LinkWithExports(libname,rev,solist,down,up) @@\ + $(RM) $@ @@\ + $(MV) $@~ $@ @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat(lib,libname.so); \ @@\ + $(LN) $@ Concat(lib,libname.so)); fi @@\ + LinkBuildLibrary($@) @@\ + LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ + @@\ +clean:: @@\ + $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) + +#endif /* SharedDepLibraryTarget */ + + +#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 |