sgi.cf 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. XCOMM platform: $TOG: sgi.cf /main/49 1998/02/26 09:12:19 barstow $
  2. #ifndef OSName
  3. # define OSName DefaultOSName
  4. #endif
  5. #ifndef OSMajorVersion
  6. # define OSMajorVersion DefaultOSMajorVersion
  7. #endif
  8. #ifndef OSMinorVersion
  9. # define OSMinorVersion DefaultOSMinorVersion
  10. #endif
  11. #ifndef OSTeenyVersion
  12. # define OSTeenyVersion DefaultOSTeenyVersion
  13. #endif
  14. XCOMM operating system: OSName (OSMajorVersion.OSMinorVersion.OSTeenyVersion)
  15. #if OSMajorVersion < 4
  16. /* We do not guarantee this will work */
  17. #define BootstrapCFlags -DX_WCHAR -DX_LOCALE -DX_USEBFUNCS -DSYSV
  18. #define StandardDefines -DX_WCHAR -DX_LOCALE -DX_USEBFUNCS -DSYSV
  19. #define SetTtyGroup NO
  20. #else
  21. #define HasPlugin YES
  22. #define SetTtyGroup YES
  23. #define ExtraFilesToClean so_locations
  24. #endif
  25. #if OSMajorVersion < 5
  26. #define SystemV YES
  27. #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
  28. #else
  29. #define BootstrapCFlags -DSVR4
  30. #define StandardDefines -DSVR4
  31. #define SystemV4 YES
  32. #define HasWChar32 YES
  33. #define HasVFork NO
  34. #if OSMajorVersion < 6
  35. #define XawI18nDefines -DHAS_WCTYPE_H -DHAS_ISW_FUNCS
  36. #else
  37. #define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS
  38. #endif
  39. #define AllocateLocalDefines -DINCLUDE_ALLOCA_H
  40. #ifndef ExtraLoadFlags
  41. #define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH)
  42. #endif
  43. #endif
  44. /*
  45. * To build 64-bit binaries define Mips64Architecture in your site.def or
  46. * host.def file. This is usually on done at the X Consortium to test
  47. * big endian 64-bit cleanliness.
  48. * To build 32-bit binaries using the old 32-bit mode, define
  49. * NoMipsN32Archtecture in your site.def or host.def file.
  50. * Otherwise the default is to use the "new 32" mode as requested by SGI.
  51. */
  52. #ifndef MipsN32Architecture
  53. #if !defined(Mips64Architecture) && !defined(NoMipsN32Architecture)
  54. #define MipsN32Architecture YES
  55. #endif
  56. #endif
  57. #ifdef Mips64Architecture
  58. # define BuildLibPathVar _RLD_ROOT=/dev/null LD_LIBRARY64_PATH
  59. # define SystemBuildLibPath /usr/lib64:/lib64
  60. # define LdCmd ld -64
  61. #elif defined(MipsN32Architecture)
  62. # define BuildLibPathVar _RLD_ROOT=/dev/null LD_LIBRARYN32_PATH
  63. # define SystemBuildLibPath /usr/lib32:/lib32
  64. # define LdCmd ld -n32
  65. #else
  66. # define BuildLibPathVar _RLD_ROOT=/dev/null LD_LIBRARY_PATH
  67. # define SystemBuildLibPath /usr/lib:/lib
  68. #endif
  69. #define HasCplusplus YES
  70. #define Malloc0ReturnsNull YES /* IRIX [56].x -lmalloc needs this */
  71. #define HasPutenv YES
  72. #define ExecableScripts YES
  73. #define HasNdbm YES
  74. #define HasPoll YES
  75. #define ExpandManNames YES
  76. #ifndef BuildXInputExt
  77. #define BuildXInputExt YES
  78. #endif
  79. #if OSMajorVersion > 3 || (OSMajorVersion == 3 && OSMinorVersion > 2)
  80. #define NeedVarargsPrototypes YES
  81. #define NeedConstPrototypes YES
  82. #define NeedWidePrototypes NO
  83. #endif
  84. #include <sgiLib.rules>
  85. #if OSMajorVersion < 5
  86. #define SymbolTables -Wf,-XNp16000,-XNd16000,-XNh2000
  87. #define PexSymbolTables -Wf,-XNp15000,-XNd15000,-XNh2000
  88. #define ServerSymbolTables -Wf,-XNp8000,-XNh2000,-XNd8000
  89. #else
  90. #define SymbolTables
  91. #define PexSymbolTables
  92. #define ServerSymbolTables
  93. #endif
  94. /* this is for floating point, ANSI cpp */
  95. #if OSMajorVersion < 5
  96. /* Extra libraries provide : yp, sysV malloc, shared libc, and widechar */
  97. # define ExtraLibraries -lsun -lmalloc -lc_s -lw
  98. # define sgiCCOptions -xansi -D__STDC__=1 -float
  99. #else
  100. # if OSMajorVersion < 6
  101. # define sgiCCOptions -xansi
  102. # else
  103. # define CppCmd cc -E -cckr
  104. # ifdef Mips64Architecture
  105. /* set Mips64Architecture in host.def. Usually don't need it but we
  106. * (the X Consortium) want a 64-bit big-endian machine to test on. */
  107. # define sgiCCOptions -xansi -mips3 -64
  108. # define DlLibrary /**/
  109. # elif defined(MipsN32Architecture)
  110. /* Set MipsN32Architecture to build "new" 32-bit objs with a 32-bit kernel. */
  111. # define sgiCCOptions -xansi -mips3 -n32
  112. # else
  113. # define sgiCCOptions -xansi
  114. # endif
  115. # if OSMinorVersion == 2
  116. /* if you haven't installed patch 1361, 1403, or 1645 on IRIX 6.2 then you
  117. * must add "#define HasPosixThreads NO" in your site.def or host.def file
  118. */
  119. # ifndef HasPosixThreads
  120. # define HasPosixThreads YES
  121. # endif
  122. # define ThreadedX HasPosixThreads
  123. # define ThreadsLibraries -lpthread
  124. /*
  125. * Add "#define HasSgiThreadsPatch1403 YES" to your site.def or host.def if
  126. * that's which patch you have.
  127. */
  128. # ifndef HasSgiThreadsPatch1403
  129. # define HasSgiThreadsPatch1403 NO
  130. # endif
  131. # if (HasSgiThreadsPatch1403)
  132. # define SystemMTDefines -D_POSIX_THREAD_SAFE_FUNCTIONS
  133. # endif
  134. # endif
  135. # endif
  136. /* SGI's -lsocket -lnsl is broken, at least in 5.2, so override here */
  137. # define ExtraLibraries /**/
  138. #endif
  139. #define DefaultCCOptions sgiCCOptions SymbolTables
  140. #define PexCCOptions sgiCCOptions PexSymbolTables
  141. #define ServerCCOptions sgiCCOptions ServerSymbolTables
  142. /* For SGI C++ compiler, need to search extra dirs in make depend */
  143. #ifndef CplusplusDependIncludes
  144. #define CplusplusDependIncludes -I/usr/include/CC
  145. #endif
  146. /* At SGI, we don't need this */
  147. #define ConstructMFLAGS NO /* build MFLAGS from MAKEFLAGS */
  148. /* Used only for compressed fonts */
  149. #define UNCOMPRESSPATH /usr/bsd/uncompress
  150. /* Normally used only to conditionally chose the default font path order */
  151. #define PrimaryScreenResolution 96
  152. /* Override Imake.tmpl's "-X" flag */
  153. #define LdCombineFlags -r
  154. /* Installation Build Parameters */
  155. #define InstKmemFlags -m 2711 -g sys
  156. #define ArCmd ar scq
  157. /* for xdm or anyone else to use */
  158. #define DefaultUserPath :/usr/sbin:/usr/bsd:/usr/bin:/bin:$(BINDIR):/etc:/usr/etc
  159. #define DefaultSystemPath /usr/sbin:/usr/bsd:/bin:/etc:/usr/bin:/usr/etc:$(BINDIR)
  160. #ifndef BuildServer
  161. #define BuildServer NO
  162. #endif
  163. #define ServerOSDefines -DDDXTIME
  164. /* only need this for binary compatibility with their ddx */
  165. #ifndef Mips64Architecture
  166. #define ServerExtraDefines -DNEED_LINEHELPER AllocateLocalDefines
  167. #else
  168. #define ServerExtraDefines -D_XSERVER64 -DNEED_LINEHELPER AllocateLocalDefines
  169. #endif
  170. /* Changed to a single shell command for pmake/smake */
  171. #if OSMajorVersion < 5
  172. /*
  173. * NormalLibObjCompile - compile fragment for a library object file
  174. * do ld -x to remove line number symbols for libraries
  175. */
  176. #define NormalLibObjCompile(options) ClearmakeOSName \
  177. $(RM) $@ $*.os \ @@\
  178. && $(CC) -c options $(CFLAGS) $*.c \ @@\
  179. && $(LD) $(LDSTRIPFLAGS) -r $@ -o $*.os \ @@\
  180. && $(MV) $*.os $@
  181. #endif
  182. #define LibObjCompile(dir,options) ClearmakeOSName \
  183. $(RM) $@ dir/$@ \ @@\
  184. && $(CC) -c $(CCOPTIONS) $(ALLDEFINES) options $*.c \ @@\
  185. && $(MV) $@ dir/$@
  186. #ifndef HasMakefileSafeInclude
  187. #define HasMakefileSafeInclude YES
  188. #endif
  189. #ifndef IncludeMakefile
  190. #define IncludeMakefile(file) @@sinclude file
  191. #endif
  192. /* needs to find nroff on the system to work */
  193. #ifndef ManKeywordsTarget
  194. #define ManKeywordsTarget(manpath) @@\
  195. man_keywords:: @@\
  196. /usr/lib/makewhatis -M $(DESTDIR)manpath $(DESTDIR)manpath/whatis
  197. #endif
  198. #define MotifDefines -DSYS_DIR -DPORT_NOVFORK -DNO_REGCOMP
  199. #ifndef CppFileTarget
  200. #define CppFileTarget(dst,src,defs,deplist) @@\
  201. dst:: src deplist @@\
  202. RemoveFile($@) @@\
  203. ClearmakeOSName \
  204. $(CPP) CppNoLineInfoOption defs src 2>/dev/null | CppSedMagic >$@; @@\
  205. @@\
  206. clean:: @@\
  207. RemoveFiles(dst)
  208. #endif /* CppFileTarget */
  209. #ifndef CppScriptTarget
  210. #if ExecableScripts /* can use #! instead of colon */
  211. #define CppScriptTarget(dst,src,defs,deplist) @@\
  212. dst:: src deplist @@\
  213. RemoveFile($@) @@\
  214. ClearmakeOSName \
  215. $(CPP) CppNoLineInfoOption defs src | CppSedMagic >$@ @@\
  216. chmod a+x $@ @@\
  217. @@\
  218. clean:: @@\
  219. RemoveFiles(dst)
  220. #else
  221. #define CppScriptTarget(dst,src,defs,deplist) @@\
  222. dst:: src deplist @@\
  223. RemoveFile($@) @@\
  224. ClearmakeOSName \
  225. echo \: >$@ @@\
  226. sed '1d' src | $(CPP) CppNoLineInfoOption defs | CppSedMagic >>$@ @@\
  227. chmod a+x $@ @@\
  228. @@\
  229. clean:: @@\
  230. RemoveFile(dst)
  231. #endif /* ExecableScripts */
  232. #endif /* CppScriptTarget */