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

  1. XCOMM $XConsortium: ibmLib.rules,v 1.5 91/05/10 09:27:27 jap Exp $
  2.  
  3. /*
  4.  * AIX shared library rules
  5.  */
  6.  
  7. #ifndef HasSharedLibraries
  8. #define HasSharedLibraries YES
  9. #endif
  10. #ifndef ForceNormalLib
  11. #define ForceNormalLib NO
  12. #endif
  13. #ifndef SharedDataSeparation
  14. #define SharedDataSeparation NO
  15. #endif
  16. #ifndef SharedCodeDef
  17. #define SharedCodeDef -DSHAREDCODE
  18. #endif
  19. #ifndef SharedLibraryDef
  20. #define SharedLibraryDef -DAIXSHLIB
  21. #endif
  22. #ifndef ShLibIncludeFile
  23. #define ShLibIncludeFile <ibmLib.tmpl>
  24. #endif
  25. #ifndef PositionIndependentCFlags
  26. #define PositionIndependentCFlags -bM\:SRE
  27. #endif
  28. #ifndef ExtraLoadFlags
  29. #define ExtraLoadFlags -bnodelcsect
  30. #endif
  31.  
  32. /*
  33.  * InstallSharedLibrary - generate rules to install the shared library.
  34.  */
  35. #ifndef InstallSharedLibrary
  36. #define    InstallSharedLibrary(libname,rev,dest)                @@\
  37. InstallLibrary(libname,dest)
  38. #endif /* InstallSharedLibrary */
  39.  
  40. /*
  41.  * InstallSharedLibraryData - generate rules to install the shared library data
  42.  */
  43. #ifndef InstallSharedLibraryData
  44. #define    InstallSharedLibraryData(libname,rev,dest)
  45. #endif /* InstallSharedLibraryData */
  46.  
  47. /*
  48.  * NormalSharedLibraryTarget - generate rules to create a shared library;
  49.  * build it into a different name so that the we do not hose people by having
  50.  * the library gone for long periods.
  51.  */
  52. #ifndef SharedLibraryTarget
  53. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  54. AllTarget(Concat(lib,libname.a))                    @@\
  55.                                     @@\
  56. Concat(lib,libname.a):  solist $(UNSHAREDOBJS)                @@\
  57.     $(RM) $@~ shr.o                            @@\
  58.     (cd down; $(AR) up/$@~ solist)                    @@\
  59.     dump -g $@~ | sed -n -e 's/^[     ]*[0-9][0-9]*[     ]*\([^     .][^     ]*\)$$/\1/p' > $@.syms    @@\
  60.     $(LD) -o shr.o $@~ -H512 -T512 -bM\:SRE -bE\:$@.syms $(REQUIREDLIBS) -lc -lm -L$(USRLIBDIR)    @@\
  61.     $(RM) $@~                            @@\
  62.     $(AR) $@~ shr.o $(UNSHAREDOBJS)                    @@\
  63.     $(RM) $@.syms $@ shr.o                        @@\
  64.     $(MV) $@~ $@                            @@\
  65.                                     @@\
  66. clean::                                    @@\
  67.     $(RM) Concat(lib,libname.a)
  68.  
  69. #endif /* SharedLibraryTarget */
  70.  
  71. /*
  72.  * SharedLibraryDataTarget - generate rules to create shlib data file;
  73.  */
  74. #ifndef SharedLibraryDataTarget
  75. #define SharedLibraryDataTarget(libname,rev,salist)
  76. #endif /* SharedLibraryTarget */
  77.