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

  1. XCOMM $XConsortium: necLib.rules /main/4 1996/09/28 16:11:42 rws $
  2.  
  3. /*
  4.  * NECOS shared library rules
  5.  */
  6.  
  7. #ifndef HasSharedLibraries
  8. #define HasSharedLibraries YES
  9. #endif
  10. #ifndef SharedDataSeparation
  11. #define SharedDataSeparation YES
  12. #endif
  13. #ifndef SharedCodeDef
  14. #define SharedCodeDef
  15. #endif
  16. #ifndef SharedLibraryDef
  17. #define SharedLibraryDef
  18. #endif
  19. #ifndef ShLibIncludeFile
  20. #define ShLibIncludeFile <necLib.tmpl>
  21. #endif
  22. #ifndef SharedLibraryLoadFlags
  23. #define SharedLibraryLoadFlags
  24. #endif
  25. #ifndef PositionIndependentCFlags
  26. #define PositionIndependentCFlags
  27. #endif
  28.  
  29.  
  30. #ifndef SeparateSharedCompile
  31. #define SeparateSharedCompile NO
  32. #endif
  33.  
  34. #define SharedLibObjCompile(options) $(_NULLCMD_)
  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.so.rev)                     @@\
  42.     MakeDir($(DESTDIR)dest)                        @@\
  43.     $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
  44.     cd $(DESTDIR)/dest; $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so)    @@\
  45.  
  46. #endif /* InstallSharedLibrary */
  47.  
  48. /*
  49.  * InstallSharedLibraryData - generate rules to install the shared library data
  50.  */
  51. #ifndef InstallSharedLibraryData
  52. #define    InstallSharedLibraryData(libname,rev,dest)            @@\
  53. install:: Concat(lib,libname.sa.rev)                    @@\
  54.     MakeDir($(DESTDIR)dest)                        @@\
  55.     $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.sa.rev) $(DESTDIR)dest @@\
  56.     RanLibrary($(RANLIBINSTFLAGS) Concat($(DESTDIR)dest/lib,libname.sa.rev))
  57.  
  58. #endif /* InstallSharedLibraryData */
  59.  
  60. /*
  61.  * SharedLibraryTarget - generate rules to create a shared library;
  62.  * build it into a different name so that we do not hose people by having
  63.  * the library gone for long periods.
  64.  */
  65. #ifndef SharedLibraryTarget
  66. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  67. AllTarget(Concat(lib,libname.so.rev))                    @@\
  68.                                     @@\
  69. Concat(lib,libname.so.rev):  solist $(EXTRALIBRARYDEPS)            @@\
  70.     $(RM) $@~                            @@\
  71.     $(CC) -G -o $@~ $(SHLIBLDFLAGS) solist                @@\
  72.     $(RM) $@                             @@\
  73.     $(MV) $@~ $@                            @@\
  74.                                     @@\
  75. AllTarget(Concat(lib,libname.so))                    @@\
  76.                                     @@\
  77. Concat(lib,libname.so):  Concat(lib,libname.so.rev)            @@\
  78.     $(RM) $@                             @@\
  79.     $(LN) $? $@                            @@\
  80.     LinkBuildLibrary($@)                        @@\
  81.     LinkBuildLibrary(Concat(lib,libname.so))            @@\
  82.                                     @@\
  83. clean::                                    @@\
  84.     $(RM) Concat(lib,libname.so.rev)
  85.  
  86. #endif /* SharedLibraryTarget */
  87.  
  88. /*
  89.  * SharedLibraryDataTarget - generate rules to create shlib data file;
  90.  */
  91. #ifndef SharedLibraryDataTarget
  92. #define SharedLibraryDataTarget(libname,rev,salist)            @@\
  93. AllTarget(Concat(lib,libname.sa.rev))                    @@\
  94.                                     @@\
  95. Concat(lib,libname.sa.rev):  salist $(EXTRALIBRARYDEPS)            @@\
  96.     $(RM) $@                            @@\
  97.     $(AR) $@ salist                            @@\
  98.     RanLibrary($@)                            @@\
  99.                                     @@\
  100. clean::                                    @@\
  101.     $(RM) Concat(lib,libname.sa.rev)
  102.  
  103. #endif /* SharedLibraryDataTarget */
  104.