1 XCOMM $TOG: Imake.cf /main/30 1998/04/28 13:55:25 barstow $
3 * To add support for another platform:
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.
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.
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).
18 * 4. Create a .cf file with the name given by MacroFile.
22 # define MacroIncludeFile <ultrix.cf>
23 # define MacroFile ultrix.cf
26 # define VaxArchitecture
30 # define MipsArchitecture
33 # define UltrixArchitecture
36 #if defined(vax) && !defined(UltrixArchitecture)
37 # define MacroIncludeFile <bsd.cf>
38 # define MacroFile bsd.cf
40 # define VaxArchitecture
46 # define BSDArchitecture
47 # define OpenBSDArchitecture
48 # define KOpenBSDArchitecture
49 # define MacroIncludeFile <OpenBSD.cf>
50 # define MacroFile OpenBSD.cf
52 # define i386BsdArchitecture
53 # define i386Architecture
56 # if defined(__sparc__) || defined(sparc)
57 # if !defined(__arch64__)
58 # define SparcArchitecture
60 # define Sparc64Architecture
65 # if defined(__mips__) || defined(mips)
66 # define MipsArchitecture
68 # define Mips64Architecture
71 # define ArcArchitecture
75 # define SGIArchitecture
79 # define PmaxArchitecture
85 # if defined(__alpha__) || defined(alpha)
86 # define AlphaArchitecture
90 # if defined(__amd64__) || defined(__x86_64__)
91 # define AMD64Architecture
97 # define Arm32Architecture
101 # define ZaurusArchitecture
104 # if defined(__mc68020__) || defined(mc68020)
105 # define Mc68020Architecture
107 # define AmigaArchitecture
111 # define Hp300Architecture
115 # define Mac68kArchitecture
118 # if defined(mvme68k)
119 # define Mvme68kArchitecture
123 # define Sun3Architecture
128 # if defined(__m88k__) || defined(m88k)
129 # define Mc88000Architecture
133 # define PpcArchitecture
140 # define SuperHArchitecture
145 # define VaxArchitecture
148 # ifndef HPArchitecture
149 # define HPArchitecture
152 # endif /* __hppa__ */
155 /* Systems based on kernel of OpenBSD */
156 #if defined(__OpenBSD_kernel__)
157 #define KOpenBSDArchitecture
161 # define MacroIncludeFile <NetBSD.cf>
162 # define MacroFile NetBSD.cf
164 # define BSDArchitecture
165 # define NetBSDArchitecture
167 # define i386BsdArchitecture
168 # define i386Architecture
172 # define AMD64BsdArchitecture
173 # define AMD64Architecture
176 # if defined(__sparc__) || defined(sparc)
177 # define SparcArchitecture
183 # define MacroIncludeFile <FreeBSD.cf>
184 # define MacroFile FreeBSD.cf
186 # define BSDArchitecture
187 # define FreeBSDArchitecture
189 # define i386BsdArchitecture
190 # define i386Architecture
194 # define AMD64BsdArchitecture
195 # define AMD64Architecture
198 #endif /* __FreeBSD__ */
201 /* Should be before the 'sun' entry because we may be cross-compiling */
202 # define MacroIncludeFile <Amoeba.cf>
203 # define MacroFile Amoeba.cf
204 # if defined(i80386) || defined(__i80386__)
206 # define i386Architecture
208 # if defined(mc68000) || defined(__mc68000__)
210 # define Sun3Architecture
211 # define SunArchitecture
213 # if defined(sparc) || defined(__sparc__)
215 # define SparcArchitecture
216 # define SunArchitecture
224 # define MacroIncludeFile <sun.cf>
225 # define MacroFile sun.cf
228 # define SVR4Architecture
232 # define SparcArchitecture
236 # define SparcV9Architecture
240 # define Sun3Architecture
244 # define i386Architecture
246 # if defined(__amd64__) || defined (__x86_64__)
249 # define AMD64Architecture
252 # define SunArchitecture
256 # define MacroIncludeFile <hp.cf>
257 # define MacroFile hp.cf
259 # define HPArchitecture
263 # define MacroIncludeFile <ncr.cf>
264 # define MacroFile ncr.cf
268 # define SVR4Architecture
269 # define i386Architecture
270 # define NCRArchitecture
274 # define MacroIncludeFile <apollo.cf>
275 # define MacroFile apollo.cf
277 # define ApolloArchitecture
281 # define MacroIncludeFile <sony.cf>
282 # define MacroFile sony.cf
285 # define SonyArchitecture
289 # define Mc68020Architecture
293 # define MipsArchitecture
296 # define SVR4Architecture
298 # if !defined(bsd43) || defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
299 # define SonySysvArchitecture
301 # define SonyBsdArchitecture
307 # define MacroIncludeFile <pegasus.cf>
308 # define MacroFile pegasus.cf
310 # define PegasusArchitecture
314 # define MacroIncludeFile <m4330.cf>
315 # define MacroFile m4330.cf
317 # define M4330Architecture
321 # define MacroIncludeFile <cray.cf>
322 # define MacroFile cray.cf
328 # define CrayArchitecture
332 # define MacroIncludeFile <sgi.cf>
333 # define MacroFile sgi.cf
335 # define SGIArchitecture
337 # define MipsArchitecture
340 # define SVR4Architecture
342 # ifdef _SYSTYPE_SVR4
343 # undef _SYSTYPE_SVR4
344 # define SVR4Architecture
349 # define MacroIncludeFile <stellar.cf>
350 # define MacroFile stellar.cf
352 # define StellarArchitecture
355 #if defined(ibm) || defined(_IBMR2) || defined(ibm032) || defined(aix)
356 # define MacroIncludeFile <ibm.cf>
357 # define MacroFile ibm.cf
361 # define IBMArchitecture
364 # define PS2Architecture
368 # define RtArchitecture
372 # define AIXArchitecture
376 # define RsArchitecture
382 # define MacroIncludeFile <luna.cf>
383 # define MacroFile luna.cf
384 # define LunaArchitecture
387 # define Mc68000Architecture
390 # define Mc88000Architecture
395 # define MacroIncludeFile <Mips.cf>
396 # define MacroFile Mips.cf
399 # if defined(SYSTYPE_BSD43) || defined(BSD) || defined(BSD43)
400 # define MipsBsdArchitecture
402 # define MipsSysvArchitecture
407 # define MacroIncludeFile <moto.cf>
408 # define MacroFile moto.cf
411 # define MotoR3Architecture
414 # define MotoR4Architecture
416 #endif /* MOTOROLA */
420 # define i386Architecture
423 # define SVR4Architecture
424 # define MacroIncludeFile <svr4.cf>
425 # define MacroFile svr4.cf
431 # define MacroIncludeFile <x386.cf>
432 # define MacroFile x386.cf
433 # define i386SVR3Architecture
441 # define i386Architecture
442 # define SVR4Architecture
443 # define i386SVR4Architecture
444 # define MacroIncludeFile <svr4.cf>
445 # define MacroFile svr4.cf
448 # define MacroIncludeFile <x386.cf>
449 # define MacroFile x386.cf
450 # define i386SVR3Architecture
455 # define MacroIncludeFile <DGUX.cf>
456 # define MacroFile DGUX.cf
458 # define DguxArchitecture
462 # define MacroIncludeFile <convex.cf>
463 # define MacroFile convex.cf
467 # define ConvexArchitecture
468 #endif /* _convex_ */
471 # define MacroIncludeFile <Oki.cf>
472 # define MacroFile Oki.cf
474 # define i860SVR4Architecture
475 # define SVR4Architecture
480 # define MacroIncludeFile <Win32.cf>
481 # define MacroFile Win32.cf
482 # define Win32Architecture
486 # define MacroIncludeFile <linux.cf>
487 # define MacroFile linux.cf
489 # define LinuxArchitecture
493 # define i386Architecture
497 # ifndef i386Architecture
498 # define i386Architecture
503 # define AlphaArchitecture
505 # endif /* __alpha */
507 # define PpcArchitecture
511 # ifndef PpcArchitecture
512 # define PpcArchitecture
516 # if defined(__amd64__) || defined (__x86_64__)
519 # define AMD64Architecture
521 # if defined(amd64__) || defined (x86_64__)
524 # ifndef AMD64Architecture
525 # define AMD64Architecture
528 # if defined(__arm__)
530 # define ARMArchitecture
532 # if defined(__sparc__) || defined(sparc)
533 # define SparcArchitecture
538 #if defined(sequent) || defined(_SEQUENT_)
539 # define MacroIncludeFile <sequent.cf>
540 # define MacroFile sequent.cf
543 # define Dynix3Architecture
547 # define DynixPtxArchitecture
549 # define SequentArchitecture
552 #if defined(_nec_ews_svr4) || defined(nec_ews_svr4) || defined(nec_ews_svr2) || defined(SX) || defined(_nec_up) || defined(_nec_ft) || defined(PC_UX)
556 # define MacroIncludeFile <nec.cf>
557 # define MacroFile nec.cf
558 # define NecArchitecture
561 #ifndef MacroIncludeFile
562 XCOMM WARNING: Imake.cf not configured; guessing at definitions!!!
563 XCOMM This might mean that BOOTSTRAPCFLAGS was not set when building imake.
564 #define MacroIncludeFile <generic.cf>
565 #define MacroFile generic.cf