home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / live / usr / X11R6 / lib / X11 / config / osfLib.rules < prev    next >
Text File  |  1999-09-03  |  4KB  |  119 lines

  1. XCOMM $XConsortium: osfLib.rules /main/16 1996/09/28 16:11:55 rws $
  2.  
  3. /*
  4.  * OSF/1 shared library rules
  5.  */
  6.  
  7. #ifndef HasSharedLibraries
  8. #define HasSharedLibraries YES
  9. #endif
  10. #ifndef SeparateSharedCompile
  11. #define SeparateSharedCompile NO
  12. #endif
  13. #ifndef SharedDataSeparation
  14. #define SharedDataSeparation NO
  15. #endif
  16. #ifndef SharedCodeDef
  17. #define SharedCodeDef /**/
  18. #endif
  19. #ifndef SharedLibraryDef
  20. #define SharedLibraryDef /**/
  21. #endif
  22. #ifndef ShLibIncludeFile
  23. #define ShLibIncludeFile <osfLib.tmpl>
  24. #endif
  25. #ifndef SharedLibraryLoadFlags
  26. #define SharedLibraryLoadFlags -shared -no_archive
  27. #endif
  28.  
  29. #ifndef PositionIndependentCFlags
  30. #define PositionIndependentCFlags /**/
  31. #endif
  32.  
  33. /*
  34.  * InstallSharedLibrary - generate rules to install the shared library.
  35.  */
  36. #ifndef InstallSharedLibrary
  37. #define    InstallSharedLibrary(libname,rev,dest)                @@\
  38. install:: Concat(lib,libname.so.rev)                     @@\
  39.     MakeDir($(DESTDIR)dest)                        @@\
  40.     $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
  41.     $(RM) Concat($(DESTDIR)dest/lib,libname.so)            @@\
  42.     cd $(DESTDIR)dest; $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  43.  
  44. #endif /* InstallSharedLibrary */
  45.  
  46. /*
  47.  * InstallSharedLibraryData - generate rules to install the shared library data
  48.  */
  49. #ifndef InstallSharedLibraryData
  50. #define    InstallSharedLibraryData(libname,rev,dest)
  51. #endif /* InstallSharedLibraryData */
  52.  
  53. #ifndef PackageName(libname)
  54. #if ModernOSF1
  55. #define PackageName(libname) /**/
  56. #define Objects(objlist) -all objlist -none 
  57. #else
  58. #define PackageName(libname) -package libname
  59. #define Objects(objlist) objlist
  60. #endif
  61. #endif
  62. #if ThreadedX && ModernOSF1 && OSMajorVersion < 4
  63. #define BaseShLibReqs -lc_r -lc
  64. #else
  65. #define BaseShLibReqs -lc
  66. #endif
  67.  
  68. /*
  69.  * SharedLibraryTarget - generate rules to create a shared library;
  70.  * build it into a different name so that we do not hose people by having
  71.  * the library gone for long periods.
  72.  */
  73. #ifndef SharedLibraryTarget
  74. #if SeparateSharedCompile
  75. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  76. AllTarget(Concat(lib,libname.so.rev))                    @@\
  77.                                     @@\
  78. Concat(lib,libname.so.rev):  solist $(EXTRALIBRARYDEPS)            @@\
  79.     $(RM) $@~                            @@\
  80.     (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) PackageName($@) \    @@\
  81.         -soname $@ Objects(solist) \                @@\
  82.         $(REQUIREDLIBS) BaseShLibReqs)                 @@\
  83.     $(RM) $@                             @@\
  84.     $(MV) $@~ $@                            @@\
  85.     $(RM) Concat(lib,libname.so)                    @@\
  86.     $(LN) $@ Concat(lib,libname.so)                    @@\
  87.     LinkBuildLibrary($@)                        @@\
  88.     LinkBuildLibrary(Concat(lib,libname.so))            @@\
  89.                                     @@\
  90. clean::                                    @@\
  91.     $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  92. #else
  93. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  94. AllTarget(Concat(lib,libname.so.rev))                    @@\
  95.                                     @@\
  96. Concat(lib,libname.so.rev):  solist $(EXTRALIBRARYDEPS)            @@\
  97.     $(RM) $@~                            @@\
  98.     $(LD) -o $@~ $(SHLIBLDFLAGS) PackageName($@) \            @@\
  99.         -soname $@ Objects(solist) \                @@\
  100.         $(REQUIREDLIBS) BaseShLibReqs                 @@\
  101.     $(RM) $@                             @@\
  102.     $(MV) $@~ $@                            @@\
  103.     $(RM) Concat(lib,libname.so)                    @@\
  104.     $(LN) $@ Concat(lib,libname.so)                    @@\
  105.     LinkBuildLibrary($@)                        @@\
  106.     LinkBuildLibrary(Concat(lib,libname.so))            @@\
  107.                                     @@\
  108. clean::                                    @@\
  109.     $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  110. #endif /* SeparateSharedCompile */
  111. #endif /* SharedLibraryTarget */
  112.  
  113. /*
  114.  * SharedLibraryDataTarget - generate rules to create shlib data file;
  115.  */
  116. #ifndef SharedLibraryDataTarget
  117. #define SharedLibraryDataTarget(libname,rev,salist)
  118. #endif /* SharedLibraryTarget */
  119.