imake/config changes to support more processors, including AMD64 (x86_64)
[oweals/cde.git] / cde / config / cf / Imake.cf
1 XCOMM $TOG: Imake.cf /main/30 1998/04/28 13:55:25 barstow $
2 /*
3  * To add support for another platform:
4  * 
5  *     1.  Identify a machine-specific cpp symbol.  If your preprocessor 
6  *         does not have any built in, you will need to add the symbol to the
7  *         cpp_argv table in config/imake/imakemdep.h and rebuild imake with
8  *         the BOOTSTRAPCFLAGS variable set (see the macII for an example).
9  *
10  *     2.  Add all machine-specific cpp symbols (either defined by you or by
11  *         the preprocessor or compiler) to the predefs table in 
12  *         config/imake/imakemdep.h.
13  *
14  *     3.  But a new #ifdef block below that defines MacroIncludeFile and
15  *         MacroFile for your new platform and then #undefs the machine-
16  *         specific preprocessor symbols (to avoid problems with file names).
17  *
18  *     4.  Create a .cf file with the name given by MacroFile.
19  */
20
21 #ifdef ultrix
22 # define MacroIncludeFile <ultrix.cf>
23 # define MacroFile ultrix.cf
24 # ifdef vax
25 #  undef vax
26 #  define VaxArchitecture
27 # endif
28 # ifdef mips
29 #  undef mips
30 #  define MipsArchitecture
31 # endif
32 # undef ultrix
33 # define UltrixArchitecture
34 #endif /* ultrix */
35
36 #if defined(vax) && !defined(UltrixArchitecture)
37 # define MacroIncludeFile <bsd.cf>
38 # define MacroFile bsd.cf
39 # undef vax
40 # define BSDArchitecture
41 # define VaxArchitecture
42 #endif /* vax */
43
44 #ifdef bsdi
45 # define MacroIncludeFile <bsdi.cf>
46 # define MacroFile bsdi.cf
47 # undef bsdi
48 # define BSD386Architecture
49 # define i386BsdArchitecture
50 # define i386Architecture
51 # undef i386
52 #endif /* bsdi */
53
54 #ifdef __NetBSD__
55 # define MacroIncludeFile <NetBSD.cf>
56 # define MacroFile NetBSD.cf
57 # undef __NetBSD__
58 # define NetBSDArchitecture
59 # ifdef __i386__
60 #  define i386BsdArchitecture
61 #  define i386Architecture
62 #  undef i386
63 # endif
64 # if defined(__sparc__) || defined(sparc)
65 #  define SparcArchitecture
66 #  undef sparc
67 # endif
68 #endif /* NetBSD */
69
70 #ifdef __FreeBSD__
71 # define MacroIncludeFile <FreeBSD.cf>
72 # define MacroFile FreeBSD.cf
73 # undef __FreeBSD__
74 # define FreeBSDArchitecture
75 # ifdef __i386__
76 #  define i386BsdArchitecture
77 #  define i386Architecture
78 #  undef i386
79 # endif
80 #endif /* __FreeBSD__ */
81
82 #ifdef AMOEBA
83  /* Should be before the 'sun' entry because we may be cross-compiling */
84 # define MacroIncludeFile <Amoeba.cf>
85 # define MacroFile Amoeba.cf
86 # if defined(i80386) || defined(__i80386__)
87 #  undef i80386
88 #  define i386Architecture
89 # else
90 #  if defined(mc68000) || defined(__mc68000__)
91 #   undef mc68000
92 #   define Sun3Architecture
93 #   define SunArchitecture
94 #  else
95 #   if defined(sparc) || defined(__sparc__)
96 #    undef sparc
97 #    define SparcArchitecture
98 #    define SunArchitecture
99 #   endif
100 #  endif
101 #  undef sun
102 # endif
103 #endif /* AMOEBA */
104
105 #ifdef sun
106 # define MacroIncludeFile <sun.cf>
107 # define MacroFile sun.cf
108 # ifdef SVR4
109 #  undef SVR4
110 #  define SVR4Architecture
111 # endif
112 # ifdef sparc
113 #  undef sparc
114 # define SparcArchitecture
115 # endif
116 # ifdef __sparcv9
117 #  undef __sparcv9
118 # define SparcV9Architecture
119 # endif
120 # ifdef mc68000
121 #  undef mc68000
122 # define Sun3Architecture
123 # endif
124 # ifdef i386
125 #  undef i386
126 #  define i386Architecture
127 # endif
128 # if defined(__amd64__) || defined (__x86_64__)
129 #  undef __amd64__
130 #  undef __x86_64__
131 #  define AMD64Architecture
132 # endif
133 # undef sun
134 # define SunArchitecture
135 #endif /* sun */
136
137 #ifdef hpux
138 # define MacroIncludeFile <hp.cf>
139 # define MacroFile hp.cf
140 # undef hpux
141 # define HPArchitecture
142 #endif /* hpux */
143
144 #ifdef sco
145 # define MacroIncludeFile <sco.cf>
146 # define MacroFile sco.cf
147 # undef sco
148 # undef USL
149 # undef SYSV
150 # undef i386
151 /* # define i386Architecture */
152 # define SCOArchitecture
153 #endif /* sco */
154
155 #ifdef USL
156 # define MacroIncludeFile <usl.cf>
157 # define MacroFile usl.cf
158 # undef USL
159 # undef SVR4
160 # undef i386
161 # define SVR4Architecture
162 # define i386Architecture
163 # define USLArchitecture
164 #endif /* USL */
165
166 #ifdef NCR
167 # define MacroIncludeFile <ncr.cf>
168 # define MacroFile ncr.cf
169 # undef NCR
170 # undef SVR4
171 # undef i386
172 # define SVR4Architecture
173 # define i386Architecture
174 # define NCRArchitecture
175 #endif /* NCR */
176
177 #ifdef apollo
178 # define MacroIncludeFile <apollo.cf>
179 # define MacroFile apollo.cf
180 # undef apollo
181 # define ApolloArchitecture
182 #endif /* apollo */
183
184 #ifdef sony
185 # define MacroIncludeFile <sony.cf>
186 # define MacroFile sony.cf
187 # undef sony
188 # undef sony_news
189 # define SonyArchitecture
190 # ifdef mc68020
191 #  undef mc68020
192 #  undef mc68030
193 #  define Mc68020Architecture
194 # endif
195 # ifdef mips
196 #  undef mips
197 #  define MipsArchitecture
198 # endif
199 # ifdef __svr4
200 #  define SVR4Architecture
201 # else
202 #  if !defined(bsd43) || defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
203 #   define SonySysvArchitecture
204 #  else
205 #   define SonyBsdArchitecture
206 #  endif
207 # endif
208 #endif /* sony */
209
210 #ifdef M4310
211 # define MacroIncludeFile <pegasus.cf>
212 # define MacroFile pegasus.cf
213 # undef M4310
214 # define PegasusArchitecture
215 #endif /* M4310 */
216
217 #ifdef M4330
218 # define MacroIncludeFile <m4330.cf>
219 # define MacroFile m4330.cf
220 # undef  M4330
221 # define M4330Architecture
222 #endif /* M4330 */
223
224 #ifdef macII
225 # define MacroIncludeFile <macII.cf>
226 # define MacroFile macII.cf
227 # undef  macII
228 # define MacIIArchitecture
229 #endif /* macII */
230
231 #ifdef _CRAY
232 # define MacroIncludeFile <cray.cf>
233 # define MacroFile cray.cf
234 # undef cray
235 # undef CRAY
236 # undef CRAY1
237 # undef CRAY2
238 # undef YMP
239 # define CrayArchitecture
240 #endif /* _CRAY */
241
242 #ifdef sgi
243 # define MacroIncludeFile <sgi.cf>
244 # define MacroFile sgi.cf
245 # undef sgi
246 # define SGIArchitecture
247 # undef mips
248 # define MipsArchitecture
249 # ifdef _SVR4
250 #  undef _SVR4
251 #  define SVR4Architecture
252 # endif
253 # ifdef _SYSTYPE_SVR4
254 #  undef _SYSTYPE_SVR4
255 #  define SVR4Architecture
256 # endif
257 #endif /* sgi */
258
259 #ifdef stellar
260 # define MacroIncludeFile <stellar.cf>
261 # define MacroFile stellar.cf
262 # undef stellar
263 # define StellarArchitecture
264 #endif /* stellar */
265
266 #if defined(ibm) || defined(_IBMR2) || defined(ibm032) || defined(aix)
267 # define MacroIncludeFile <ibm.cf>
268 # define MacroFile ibm.cf
269 # ifdef ibm
270 #  undef ibm
271 # endif
272 # define IBMArchitecture
273 # ifdef i386
274 #  undef i386
275 #  define PS2Architecture
276 # endif
277 # ifdef ibm032
278 #  undef ibm032
279 #  define RtArchitecture
280 # endif
281 # ifdef aix
282 #  undef aix
283 #  define AIXArchitecture
284 # endif
285 # ifdef _IBMR2
286 #  undef _IBMR2
287 #  define RsArchitecture
288 # endif
289 #endif /* ibm */
290
291 #ifdef luna
292 # undef luna
293 # define MacroIncludeFile <luna.cf>
294 # define MacroFile luna.cf
295 # define LunaArchitecture
296 # ifdef mc68000
297 #  undef mc68000
298 #  define Mc68000Architecture
299 # else
300 #  undef mc88000
301 #  define Mc88000Architecture
302 # endif
303 #endif /* luna */
304
305 #ifdef Mips
306 #  define MacroIncludeFile <Mips.cf>
307 #  define MacroFile Mips.cf
308 #  undef Mips
309 #  undef mips
310 #  if defined(SYSTYPE_BSD43) || defined(BSD) || defined(BSD43)
311 #    define MipsBsdArchitecture
312 #  else /* BSD */
313 #    define MipsSysvArchitecture
314 #  endif /* BSD */
315 #endif /* Mips */
316
317 #ifdef MOTOROLA
318 # define MacroIncludeFile <moto.cf>
319 # define MacroFile moto.cf
320 # undef MOTOROLA        
321 # ifdef SYSV
322 #  define MotoR3Architecture
323 # endif
324 # ifdef SVR4
325 #  define MotoR4Architecture
326 # endif
327 #endif /* MOTOROLA */
328
329 #ifdef SVR4
330 # ifdef i386
331 #  define i386Architecture
332 #  undef i386
333 # endif
334 # define SVR4Architecture
335 # define MacroIncludeFile <svr4.cf>
336 # define MacroFile svr4.cf
337 # undef SVR4
338 #endif /* SVR4 */
339
340 #ifdef SYSV
341 # ifdef i386
342 #  define MacroIncludeFile <x386.cf>
343 #  define MacroFile x386.cf
344 #  define i386SVR3Architecture
345 #  undef i386
346 # endif
347 #endif /* SYSV */
348
349 #ifdef SYSV386
350 # undef i386
351 # ifdef SVR4
352 #  define i386Architecture
353 #  define SVR4Architecture
354 #  define i386SVR4Architecture
355 #  define MacroIncludeFile <svr4.cf>
356 #  define MacroFile svr4.cf
357 #  undef SVR4
358 # else
359 #  define MacroIncludeFile <x386.cf>
360 #  define MacroFile x386.cf
361 #  define i386SVR3Architecture
362 # endif
363 #endif /* SYSV386 */
364
365 #ifdef DGUX
366 # define MacroIncludeFile <DGUX.cf>
367 # define MacroFile DGUX.cf
368 # undef DGUX
369 # define DguxArchitecture
370 #endif /* DGUX */
371
372 #ifdef __convex__
373 # define MacroIncludeFile <convex.cf>
374 # define MacroFile convex.cf
375 # ifdef convex
376 #  undef convex
377 # endif
378 # define ConvexArchitecture
379 #endif /* _convex_ */
380
381 #ifdef __osf__
382 # define MacroIncludeFile <osf1.cf>
383 # define MacroFile osf1.cf
384 # define OSF1Architecture
385 # undef __osf__
386 # ifdef __mips__
387 #  undef __mips__
388 #  define MipsArchitecture
389 # endif
390 # ifdef __alpha
391 #  undef __alpha
392 #  define AlphaArchitecture
393 # endif
394 #endif /* __osf__ */
395
396 #ifdef Oki
397 # define MacroIncludeFile <Oki.cf>
398 # define MacroFile Oki.cf
399 # undef Oki
400 # define i860SVR4Architecture
401 # define SVR4Architecture
402 # undef SVR4
403 #endif /* Oki */
404
405 #ifdef WIN32
406 # define MacroIncludeFile <Win32.cf>
407 # define MacroFile Win32.cf
408 # define Win32Architecture
409 #endif /* WIN32 */
410
411 #ifdef linux 
412 # define MacroIncludeFile <linux.cf>
413 # define MacroFile linux.cf
414 # undef linux
415 # define LinuxArchitecture
416 # ifdef i386
417 #  undef pentium
418 #  undef pentiumpro
419 #  define i386Architecture
420 #  undef i386
421 # endif
422 # ifdef __i386__
423 #  ifndef i386Architecture
424 #   define i386Architecture
425 #  endif
426 #  undef __i386__
427 # endif /* i386 */
428 # ifdef __alpha
429 #  define AlphaArchitecture
430 #  undef __alpha
431 # endif /* __alpha */
432 # ifdef powerpc
433 #  define PpcArchitecture
434 #  undef powerpc
435 # endif
436 # ifdef __powerpc__
437 #  ifndef PpcArchitecture
438 #   define PpcArchitecture
439 #  endif
440 #  undef __powerpc__
441 # endif
442 # if defined(__amd64__) || defined (__x86_64__)
443 #  undef __amd64__
444 #  undef __x86_64__
445 #  define AMD64Architecture
446 # endif
447 # if defined(amd64__) || defined (x86_64__)
448 #  undef amd64__
449 #  undef x86_64__
450 #  ifndef AMD64Architecture
451 #   define AMD64Architecture
452 #  endif
453 # endif
454 #endif /* linux */
455
456 #ifdef __uxp__
457 # define MacroIncludeFile <fujitsu.cf>
458 # define MacroFile fujitsu.cf
459 # define FujitsuArchitecture
460 # undef __uxp__
461 # define UXPArchitecture
462 # define SVR4Architecture
463 # ifdef sparc
464 #  undef sparc
465 #  define SparcArchitecture
466 # endif
467 #endif /* __uxp__ */
468
469 #ifdef __sxg__
470 # define MacroIncludeFile <fujitsu.cf>
471 # define MacroFile fujitsu.cf
472 # define FujitsuArchitecture
473 # undef __sxg__
474 # define mc68000Architecture
475 #endif /* __sxg__ */
476
477 #if defined(sequent) || defined(_SEQUENT_)
478 # define MacroIncludeFile <sequent.cf>
479 # define MacroFile sequent.cf
480 # ifdef sequent
481 #  undef sequent
482 #  define Dynix3Architecture
483 # endif
484 # ifdef _SEQUENT_
485 #  undef _SEQUENT_
486 #  define DynixPtxArchitecture
487 # endif
488 # define SequentArchitecture
489 #endif
490
491 #if defined(_nec_ews_svr4) || defined(nec_ews_svr4) || defined(nec_ews_svr2) || defined(SX) || defined(_nec_up) || defined(_nec_ft) || defined(PC_UX)
492 # ifdef nec
493 #  undef nec
494 # endif
495 # define MacroIncludeFile <nec.cf>
496 # define MacroFile nec.cf
497 # define NecArchitecture
498 #endif
499
500 #ifndef MacroIncludeFile
501 XCOMM WARNING:  Imake.cf not configured; guessing at definitions!!!
502 XCOMM This might mean that BOOTSTRAPCFLAGS was not set when building imake.
503 #define MacroIncludeFile <generic.cf>
504 #define MacroFile generic.cf
505 #endif