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

  1. XCOMM $XConsortium: bsdLib.rules /main/2 1996/01/24 06:38:15 kaleb $
  2.  
  3. /*
  4.  * NetBSD/FreeBSD 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 -DBSDSHLIB
  18. #endif
  19. #ifndef ShLibIncludeFile
  20. #define ShLibIncludeFile <bsdLib.tmpl>
  21. #endif
  22. #ifndef SharedLibraryLoadFlags
  23. #define SharedLibraryLoadFlags -Bshareable
  24. #endif
  25. #ifndef PositionIndependentCFlags
  26. #define PositionIndependentCFlags -fpic
  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. @@\
  38.  
  39. #endif /* InstallSharedLibrary */
  40.  
  41. /*
  42.  * NormalSharedLibraryTarget - generate rules to create a shared library;
  43.  * build it into a different name so that the we do not hose people by having
  44.  * the library gone for long periods.
  45.  */
  46. #ifndef SharedLibraryTarget
  47. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  48. AllTarget(Concat(lib,libname.so.rev))                    @@\
  49.                                     @@\
  50. Concat(lib,libname.so.rev):  solist                    @@\
  51.     $(RM) $@~                            @@\
  52.     (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\
  53.     $(RM) $@                            @@\
  54.     $(MV) $@~ $@                            @@\
  55.     LinkBuildLibrary($@)                        @@\
  56.                                     @@\
  57. clean::                                    @@\
  58.     $(RM) Concat(lib,libname.so.rev)
  59.  
  60. #endif /* SharedLibraryTarget */
  61.  
  62. /*
  63.  * SharedLibraryDataTarget - generate rules to create shlib data file;
  64.  */
  65. #ifndef SharedLibraryDataTarget
  66. #define SharedLibraryDataTarget(libname,rev,salist)
  67. #endif /* SharedLibraryDataTarget */
  68.  
  69. #ifndef InstallSharedLibraryData
  70. #define InstallSharedLibraryData(libname,rev,dest)
  71. #endif /* InstallSharedLibraryData */
  72.  
  73. /*
  74.  * SharedLibReferences - variables for shared libraries
  75.  */
  76. #ifndef SharedLibReferences
  77. #define SharedLibReferences(varname,libname,libsource,revname,rev)    @@\
  78. revname = rev                                @@\
  79. Concat3(DEP,varname,LIB) = SharedLibDependencies(libname,libsource,revname) @@\
  80. Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname)        @@\
  81. LintLibReferences(varname,libname,libsource)
  82. #endif
  83.  
  84. /*
  85.  * SharedDSLibReferences - variables for shared libraries
  86.  */
  87. #ifndef SharedDSLibReferences
  88. #define SharedDSLibReferences(varname,libname,libsource,revname,rev)    @@\
  89. revname = rev                                @@\
  90. Concat3(DEP,varname,LIB) = SharedDSLibDependencies(libname,libsource,revname) @@\
  91. Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) Concat3(Shared,libname,Reqs)        @@\
  92. LintLibReferences(varname,libname,libsource)
  93. #endif
  94.