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

  1. XCOMM $XConsortium: hpLib.rules /main/10 1995/10/19 11:27:02 swick $
  2.  
  3. /*
  4.  * HP 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 <hpLib.tmpl>
  21. #endif
  22. #ifndef SharedLibraryLoadFlags
  23. #define SharedLibraryLoadFlags -b
  24. #endif
  25. #ifndef PositionIndependentCFlags
  26. #define PositionIndependentCFlags +z
  27. #endif
  28. #ifndef InstLibFlags
  29. #define InstLibFlags -m 0555
  30. #endif
  31. #ifndef UseInstalled
  32. /* assert: LdPostLib pulls in -L$(USRLIBDIR), so it doesn't need to be here */
  33. #define ExtraLoadFlags -Wl,+s,+b,$(USRLIBDIR)
  34. #endif
  35.  
  36. /*
  37.  * InstallSharedLibrary - generate rules to install the shared library.
  38.  */
  39. #ifndef InstallSharedLibrary
  40. #define    InstallSharedLibrary(libname,rev,dest)                @@\
  41. install:: Concat(lib,libname.sl.rev)                     @@\
  42.     MakeDir($(DESTDIR)dest)                        @@\
  43.     RMoveToBakFile(Concat($(DESTDIR)dest/lib,libname.sl.rev))    @@\
  44.     $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.sl.rev) $(DESTDIR)dest @@\
  45.     $(RM) Concat($(DESTDIR)dest/lib,libname.sl)            @@\
  46.     cd $(DESTDIR)dest; $(LN) Concat(lib,libname.sl.rev) Concat(lib,libname.sl) @@\
  47.     -RemoveFile(Concat(lib,libname.sl.rev.bak))
  48.  
  49. #endif /* InstallSharedLibrary */
  50.  
  51. /*
  52.  * InstallSharedLibraryData - generate rules to install the shared library data
  53.  */
  54. #ifndef InstallSharedLibraryData
  55. #define    InstallSharedLibraryData(libname,rev,dest)
  56. #endif /* InstallSharedLibraryData */
  57.  
  58.  
  59. /*
  60.  * SharedLibraryTarget - generate rules to create a shared library;
  61.  * build it into a different name so that we do not hose people by having
  62.  * the library gone for long periods.
  63.  */
  64. #ifndef SharedLibraryTarget
  65. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  66. AllTarget(Concat(lib,libname.sl.rev))                    @@\
  67.                                     @@\
  68. Concat(lib,libname.sl.rev):  solist                    @@\
  69.     $(RM) $@~                            @@\
  70.     (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist)        @@\
  71.     $(RM) $@                             @@\
  72.     $(MV) $@~ $@                            @@\
  73.     $(RM) Concat(lib,libname.sl)                    @@\
  74.     $(LN) $@ Concat(lib,libname.sl)                    @@\
  75.     LinkBuildLibrary($@)                        @@\
  76.     LinkBuildLibrary(Concat(lib,libname.sl))            @@\
  77.                                     @@\
  78. clean::                                    @@\
  79.     $(RM) Concat(lib,libname.sl.rev) Concat(lib,libname.sl)
  80.  
  81. #endif /* SharedLibraryTarget */
  82.  
  83. /*
  84.  * SharedLibraryDataTarget - generate rules to create shlib data file;
  85.  */
  86. #ifndef SharedLibraryDataTarget
  87. #define SharedLibraryDataTarget(libname,rev,salist)
  88. #endif /* SharedLibraryTarget */
  89.