home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / config / sgiLib.rules < prev    next >
Encoding:
Text File  |  1991-03-24  |  1.7 KB  |  50 lines

  1. XCOMM $XConsortium: sgiLib.rules,v 1.5 91/03/25 09:52:02 rws Exp $
  2.  
  3. #ifndef HasSharedLibraries
  4. #define HasSharedLibraries YES
  5. #endif
  6. #ifndef SharedDataSeparation
  7. #define SharedDataSeparation YES
  8. #endif
  9. #define SharedCodeDef -DSHAREDCODE
  10. #define SharedLibraryDef -DATTSHAREDLIB
  11. #define PositionIndependentCFlags -G 0
  12.  
  13. /*
  14.  * SharedLibraryTarget - generate rules to create a shared library;
  15.  * build it into a different name so that the we don't hose people by having
  16.  * the library gone for long periods.
  17.  */
  18. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  19. AllTarget(Concat3(lib,libname,_s))                    @@\
  20.                                     @@\
  21. Concat3(lib,libname,_s: sharedlib.o solist Concat(lib,libname.spec)    @@\
  22.     $(RM) $@ $@.a \                            @@\
  23.     && cd down \                            @@\
  24.     && mkshlib -s Concat(up/lib,libname.spec) -t up/$@ -h up/$@.a \    @@\
  25.     && ar rs up/$@.a sharedlib.o                    @@\
  26.                                     @@\
  27. clean::                                    @@\
  28.     $(RM) Concat3(lib,libname,_s) Concat3(lib,libname,_s.a)
  29.  
  30. #define SharedLibraryDataTarget(libname,rev,salist)
  31.  
  32. /*
  33.  * InstallSharedLibrary - generate rules to install the shared library.
  34.  * NOTE: file must be executable, hence "INSTBINFLAGS"
  35.  */
  36. #define    InstallSharedLibrary(libname,rev,dest)                @@\
  37. install:: Concat3(lib,libname,_s)                    @@\
  38.     MakeDir($(DESTDIR)dest)                        @@\
  39.     $(INSTALL) -c $(INSTLIBFLAGS) Concat3(lib,libname,_s.a) $(DESTDIR)dest @@\
  40.     $(INSTALL) -c $(INSTBINFLAGS) Concat3(lib,libname,_s) $(DESTDIR)dest
  41.  
  42.  
  43. /*
  44.  * InstallSharedLibraryData - generate rules to install the shared library data
  45.  */
  46. #define    InstallSharedLibraryData(libname,rev,dest)            @@\
  47. install:: Concat3(lib,libname,_s.a)                    @@\
  48.     MakeDir($(DESTDIR)dest)                        @@\
  49.     $(INSTALL) -c $(INSTLIBFLAGS) Concat3(lib,libname,_s.a) $(DESTDIR)dest
  50.