home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / x11r6.1 / lib / x11 / config / sv4lib.rules < prev    next >
Encoding:
Text File  |  1996-10-17  |  2.5 KB  |  91 lines

  1. XCOMM $XConsortium: sv4Lib.rules /main/17 1995/12/01 18:31:40 kaleb $
  2.  
  3. /*
  4.  * SVR4 shared library rules
  5.  */
  6.  
  7. #ifndef HasSharedLibraries
  8. #define HasSharedLibraries YES
  9. #endif
  10. #ifndef SharedDataSeparation
  11. #define SharedDataSeparation NO
  12. #endif
  13. #ifndef SharedCodeDef
  14. #define SharedCodeDef /**/
  15. #endif
  16. #ifndef SharedLibraryDef
  17. #define SharedLibraryDef /**/
  18. #endif
  19. #ifndef ShLibIncludeFile
  20. #define ShLibIncludeFile <sv4Lib.tmpl>
  21. #endif
  22. #ifndef SharedLibraryLoadFlags
  23. #define SharedLibraryLoadFlags -G -z text
  24. #endif
  25. #ifndef PositionIndependentCFlags
  26. #if HasGcc2
  27. #define PositionIndependentCFlags -fpic
  28. #else
  29. #define PositionIndependentCFlags -K PIC
  30. #endif
  31. #endif
  32. #ifndef PositionIndependentCplusplusFlags
  33. #if HasGcc2ForCplusplus
  34. #define PositionIndependentCplusplusFlags -fpic
  35. #else
  36. #define PositionIndependentCplusplusFlags -K PIC
  37. #endif
  38. #endif
  39.  
  40. /*
  41.  * InstallSharedLibrary - generate rules to install the shared library.
  42.  */
  43. #ifndef InstallSharedLibrary
  44. #define    InstallSharedLibrary(libname,rev,dest)                @@\
  45. install:: Concat(lib,libname.so.rev)                     @@\
  46.     MakeDir($(DESTDIR)dest)                        @@\
  47.     $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
  48.     $(RM) Concat($(DESTDIR)dest/lib,libname.so)            @@\
  49.     cd $(DESTDIR)dest; $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  50.  
  51. #endif /* InstallSharedLibrary */
  52.  
  53. /*
  54.  * InstallSharedLibraryData - generate rules to install the shared library data
  55.  */
  56. #ifndef InstallSharedLibraryData
  57. #define    InstallSharedLibraryData(libname,rev,dest)
  58. #endif /* InstallSharedLibraryData */
  59.  
  60.  
  61. /*
  62.  * SharedLibraryTarget - generate rules to create a shared library;
  63.  * build it into a different name so that we do not hose people by having
  64.  * the library gone for long periods.
  65.  */
  66. #ifndef SharedLibraryTarget
  67. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  68. AllTarget(Concat(lib,libname.so.rev))                    @@\
  69.                                     @@\
  70. Concat(lib,libname.so.rev):  solist                    @@\
  71.     $(RM) $@~                            @@\
  72.     (cd down; $(CCENVSETUP) $(LD) -o up/$@~ $(SHLIBLDFLAGS) -h $@ solist $(REQUIREDLIBS))        @@\
  73.     $(RM) $@                             @@\
  74.     $(MV) $@~ $@                            @@\
  75.     $(RM) Concat(lib,libname.so)                    @@\
  76.     $(LN) $@ Concat(lib,libname.so)                    @@\
  77.     LinkBuildLibrary($@)                        @@\
  78.     LinkBuildLibrary(Concat(lib,libname.so))            @@\
  79.                                     @@\
  80. clean::                                    @@\
  81.     $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  82.  
  83. #endif /* SharedLibraryTarget */
  84.  
  85. /*
  86.  * SharedLibraryDataTarget - generate rules to create shlib data file;
  87.  */
  88. #ifndef SharedLibraryDataTarget
  89. #define SharedLibraryDataTarget(libname,rev,salist)
  90. #endif /* SharedLibraryTarget */
  91.