Initial import of the CDE 2.1.30 sources from the Open Group.
[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 mc68000
117 #  undef mc68000
118 # define Sun3Architecture
119 # endif
120 # ifdef i386
121 #  undef i386
122 #  define i386Architecture
123 # endif
124 # undef sun
125 # define SunArchitecture
126 #endif /* sun */
127
128 #ifdef hpux
129 # define MacroIncludeFile <hp.cf>
130 # define MacroFile hp.cf
131 # undef hpux
132 # define HPArchitecture
133 #endif /* hpux */
134
135 #ifdef sco
136 # define MacroIncludeFile <sco.cf>
137 # define MacroFile sco.cf
138 # undef sco
139 # undef USL
140 # undef SYSV
141 # undef i386
142 /* # define i386Architecture */
143 # define SCOArchitecture
144 #endif /* sco */
145
146 #ifdef USL
147 # define MacroIncludeFile <usl.cf>
148 # define MacroFile usl.cf
149 # undef USL
150 # undef SVR4
151 # undef i386
152 # define SVR4Architecture
153 # define i386Architecture
154 # define USLArchitecture
155 #endif /* USL */
156
157 #ifdef NCR
158 # define MacroIncludeFile <ncr.cf>
159 # define MacroFile ncr.cf
160 # undef NCR
161 # undef SVR4
162 # undef i386
163 # define SVR4Architecture
164 # define i386Architecture
165 # define NCRArchitecture
166 #endif /* NCR */
167
168 #ifdef apollo
169 # define MacroIncludeFile <apollo.cf>
170 # define MacroFile apollo.cf
171 # undef apollo
172 # define ApolloArchitecture
173 #endif /* apollo */
174
175 #ifdef sony
176 # define MacroIncludeFile <sony.cf>
177 # define MacroFile sony.cf
178 # undef sony
179 # undef sony_news
180 # define SonyArchitecture
181 # ifdef mc68020
182 #  undef mc68020
183 #  undef mc68030
184 #  define Mc68020Architecture
185 # endif
186 # ifdef mips
187 #  undef mips
188 #  define MipsArchitecture
189 # endif
190 # ifdef __svr4
191 #  define SVR4Architecture
192 # else
193 #  if !defined(bsd43) || defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
194 #   define SonySysvArchitecture
195 #  else
196 #   define SonyBsdArchitecture
197 #  endif
198 # endif
199 #endif /* sony */
200
201 #ifdef M4310
202 # define MacroIncludeFile <pegasus.cf>
203 # define MacroFile pegasus.cf
204 # undef M4310
205 # define PegasusArchitecture
206 #endif /* M4310 */
207
208 #ifdef M4330
209 # define MacroIncludeFile <m4330.cf>
210 # define MacroFile m4330.cf
211 # undef  M4330
212 # define M4330Architecture
213 #endif /* M4330 */
214
215 #ifdef macII
216 # define MacroIncludeFile <macII.cf>
217 # define MacroFile macII.cf
218 # undef  macII
219 # define MacIIArchitecture
220 #endif /* macII */
221
222 #ifdef _CRAY
223 # define MacroIncludeFile <cray.cf>
224 # define MacroFile cray.cf
225 # undef cray
226 # undef CRAY
227 # undef CRAY1
228 # undef CRAY2
229 # undef YMP
230 # define CrayArchitecture
231 #endif /* _CRAY */
232
233 #ifdef sgi
234 # define MacroIncludeFile <sgi.cf>
235 # define MacroFile sgi.cf
236 # undef sgi
237 # define SGIArchitecture
238 # undef mips
239 # define MipsArchitecture
240 # ifdef _SVR4
241 #  undef _SVR4
242 #  define SVR4Architecture
243 # endif
244 # ifdef _SYSTYPE_SVR4
245 #  undef _SYSTYPE_SVR4
246 #  define SVR4Architecture
247 # endif
248 #endif /* sgi */
249
250 #ifdef stellar
251 # define MacroIncludeFile <stellar.cf>
252 # define MacroFile stellar.cf
253 # undef stellar
254 # define StellarArchitecture
255 #endif /* stellar */
256
257 #if defined(ibm) || defined(_IBMR2) || defined(ibm032) || defined(aix)
258 # define MacroIncludeFile <ibm.cf>
259 # define MacroFile ibm.cf
260 # ifdef ibm
261 #  undef ibm
262 # endif
263 # define IBMArchitecture
264 # ifdef i386
265 #  undef i386
266 #  define PS2Architecture
267 # endif
268 # ifdef ibm032
269 #  undef ibm032
270 #  define RtArchitecture
271 # endif
272 # ifdef aix
273 #  undef aix
274 #  define AIXArchitecture
275 # endif
276 # ifdef _IBMR2
277 #  undef _IBMR2
278 #  define RsArchitecture
279 # endif
280 #endif /* ibm */
281
282 #ifdef luna
283 # undef luna
284 # define MacroIncludeFile <luna.cf>
285 # define MacroFile luna.cf
286 # define LunaArchitecture
287 # ifdef mc68000
288 #  undef mc68000
289 #  define Mc68000Architecture
290 # else
291 #  undef mc88000
292 #  define Mc88000Architecture
293 # endif
294 #endif /* luna */
295
296 #ifdef Mips
297 #  define MacroIncludeFile <Mips.cf>
298 #  define MacroFile Mips.cf
299 #  undef Mips
300 #  undef mips
301 #  if defined(SYSTYPE_BSD43) || defined(BSD) || defined(BSD43)
302 #    define MipsBsdArchitecture
303 #  else /* BSD */
304 #    define MipsSysvArchitecture
305 #  endif /* BSD */
306 #endif /* Mips */
307
308 #ifdef MOTOROLA
309 # define MacroIncludeFile <moto.cf>
310 # define MacroFile moto.cf
311 # undef MOTOROLA        
312 # ifdef SYSV
313 #  define MotoR3Architecture
314 # endif
315 # ifdef SVR4
316 #  define MotoR4Architecture
317 # endif
318 #endif /* MOTOROLA */
319
320 #ifdef SVR4
321 # ifdef i386
322 #  define i386Architecture
323 #  undef i386
324 # endif
325 # define SVR4Architecture
326 # define MacroIncludeFile <svr4.cf>
327 # define MacroFile svr4.cf
328 # undef SVR4
329 #endif /* SVR4 */
330
331 #ifdef SYSV
332 # ifdef i386
333 #  define MacroIncludeFile <x386.cf>
334 #  define MacroFile x386.cf
335 #  define i386SVR3Architecture
336 #  undef i386
337 # endif
338 #endif /* SYSV */
339
340 #ifdef SYSV386
341 # undef i386
342 # ifdef SVR4
343 #  define i386Architecture
344 #  define SVR4Architecture
345 #  define i386SVR4Architecture
346 #  define MacroIncludeFile <svr4.cf>
347 #  define MacroFile svr4.cf
348 #  undef SVR4
349 # else
350 #  define MacroIncludeFile <x386.cf>
351 #  define MacroFile x386.cf
352 #  define i386SVR3Architecture
353 # endif
354 #endif /* SYSV386 */
355
356 #ifdef DGUX
357 # define MacroIncludeFile <DGUX.cf>
358 # define MacroFile DGUX.cf
359 # undef DGUX
360 # define DguxArchitecture
361 #endif /* DGUX */
362
363 #ifdef __convex__
364 # define MacroIncludeFile <convex.cf>
365 # define MacroFile convex.cf
366 # ifdef convex
367 #  undef convex
368 # endif
369 # define ConvexArchitecture
370 #endif /* _convex_ */
371
372 #ifdef __osf__
373 # define MacroIncludeFile <osf1.cf>
374 # define MacroFile osf1.cf
375 # define OSF1Architecture
376 # undef __osf__
377 # ifdef __mips__
378 #  undef __mips__
379 #  define MipsArchitecture
380 # endif
381 # ifdef __alpha
382 #  undef __alpha
383 #  define AlphaArchitecture
384 # endif
385 #endif /* __osf__ */
386
387 #ifdef Oki
388 # define MacroIncludeFile <Oki.cf>
389 # define MacroFile Oki.cf
390 # undef Oki
391 # define i860SVR4Architecture
392 # define SVR4Architecture
393 # undef SVR4
394 #endif /* Oki */
395
396 #ifdef WIN32
397 # define MacroIncludeFile <Win32.cf>
398 # define MacroFile Win32.cf
399 # define Win32Architecture
400 #endif /* WIN32 */
401
402 #ifdef linux 
403 # define MacroIncludeFile <linux.cf>
404 # define MacroFile linux.cf
405 # undef linux
406 # define LinuxArchitecture
407 # ifdef i386
408 #  define i386Architecture
409 #  undef i386
410 # ifdef __i386__
411 #  ifndef i386Architecture
412 #   define i386Architecture
413 #  endif
414 #  undef __i386__
415 # endif /* i386 */
416 # ifdef __alpha
417 #  define AlphaArchitecture
418 #  undef __alpha
419 # endif /* __alpha */
420 #endif
421 #endif /* linux */
422
423 #ifdef __uxp__
424 # define MacroIncludeFile <fujitsu.cf>
425 # define MacroFile fujitsu.cf
426 # define FujitsuArchitecture
427 # undef __uxp__
428 # define UXPArchitecture
429 # define SVR4Architecture
430 # ifdef sparc
431 #  undef sparc
432 #  define SparcArchitecture
433 # endif
434 #endif /* __uxp__ */
435
436 #ifdef __sxg__
437 # define MacroIncludeFile <fujitsu.cf>
438 # define MacroFile fujitsu.cf
439 # define FujitsuArchitecture
440 # undef __sxg__
441 # define mc68000Architecture
442 #endif /* __sxg__ */
443
444 #if defined(sequent) || defined(_SEQUENT_)
445 # define MacroIncludeFile <sequent.cf>
446 # define MacroFile sequent.cf
447 # ifdef sequent
448 #  undef sequent
449 #  define Dynix3Architecture
450 # endif
451 # ifdef _SEQUENT_
452 #  undef _SEQUENT_
453 #  define DynixPtxArchitecture
454 # endif
455 # define SequentArchitecture
456 #endif
457
458 #if defined(_nec_ews_svr4) || defined(nec_ews_svr4) || defined(nec_ews_svr2) || defined(SX) || defined(_nec_up) || defined(_nec_ft) || defined(PC_UX)
459 # ifdef nec
460 #  undef nec
461 # endif
462 # define MacroIncludeFile <nec.cf>
463 # define MacroFile nec.cf
464 # define NecArchitecture
465 #endif
466
467 #ifndef MacroIncludeFile
468 XCOMM WARNING:  Imake.cf not configured; guessing at definitions!!!
469 XCOMM This might mean that BOOTSTRAPCFLAGS was not set when building imake.
470 #define MacroIncludeFile <generic.cf>
471 #define MacroFile generic.cf
472 #endif