home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / config / sv4Lib.rules < prev    next >
Encoding:
Text File  |  1991-07-19  |  2.1 KB  |  78 lines

  1. XCOMM $XConsortium: sv4Lib.rules,v 1.8 91/07/19 15:38:53 rws Exp $
  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. #define PositionIndependentCFlags -K PIC
  27. #endif
  28.  
  29. /*
  30.  * InstallSharedLibrary - generate rules to install the shared library.
  31.  */
  32. #ifndef InstallSharedLibrary
  33. #define    InstallSharedLibrary(libname,rev,dest)                @@\
  34. install:: Concat(lib,libname.so.rev)                     @@\
  35.     MakeDir($(DESTDIR)dest)                        @@\
  36.     $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
  37.     $(RM) Concat($(DESTDIR)dest/lib,libname.so)            @@\
  38.     $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)
  39.  
  40. #endif /* InstallSharedLibrary */
  41.  
  42. /*
  43.  * InstallSharedLibraryData - generate rules to install the shared library data
  44.  */
  45. #ifndef InstallSharedLibraryData
  46. #define    InstallSharedLibraryData(libname,rev,dest)
  47. #endif /* InstallSharedLibraryData */
  48.  
  49.  
  50. /*
  51.  * SharedLibraryTarget - generate rules to create a shared library;
  52.  * build it into a different name so that we do not hose people by having
  53.  * the library gone for long periods.
  54.  */
  55. #ifndef SharedLibraryTarget
  56. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  57. AllTarget(Concat(lib,libname.so.rev))                    @@\
  58.                                     @@\
  59. Concat(lib,libname.so.rev):  solist                    @@\
  60.     $(RM) $@~                            @@\
  61.     (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) -h $@ solist)        @@\
  62.     $(RM) $@                             @@\
  63.     $(MV) $@~ $@                            @@\
  64.     $(RM) Concat(lib,libname.so)                    @@\
  65.     $(LN) $@ Concat(lib,libname.so)                    @@\
  66.                                     @@\
  67. clean::                                    @@\
  68.     $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  69.  
  70. #endif /* SharedLibraryTarget */
  71.  
  72. /*
  73.  * SharedLibraryDataTarget - generate rules to create shlib data file;
  74.  */
  75. #ifndef SharedLibraryDataTarget
  76. #define SharedLibraryDataTarget(libname,rev,salist)
  77. #endif /* SharedLibraryTarget */
  78.