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