first check-in of feisty meow codebase. many things broken still due to recent
[feisty_meow.git] / core / tools / dependency_tool / imakemdep.h
1 /* $XConsortium: imakemdep.h,v 1.82 95/01/12 16:27:01 kaleb Exp $ */
2 /* $XFree86: xc/config/imake/imakemdep.h,v 3.8 1995/01/28 15:40:59 dawes Exp $ */
3 /*
4
5 Copyright (c) 1993, 1994  X Consortium
6
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software and associated documentation files (the "Software"), to deal
9 in the Software without restriction, including without limitation the rights
10 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
13
14 The above copyright notice and this permission notice shall be included in
15 all copies or substantial portions of the Software.
16
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
20 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
24 Except as contained in this notice, the name of the X Consortium shall not be
25 used in advertising or otherwise to promote the sale, use or other dealings
26 in this Software without prior written authorization from the X Consortium.
27
28 */
29
30
31 /* 
32  * This file contains machine-dependent constants for the imake utility.
33  * When porting imake, read each of the steps below and add in any necessary
34  * definitions.  In general you should *not* edit ccimake.c or imake.c!
35  */
36
37 #ifdef CCIMAKE
38 /*
39  * Step 1:  imake_ccflags
40  *     Define any special flags that will be needed to get imake.c to compile.
41  *     These will be passed to the compile along with the contents of the
42  *     make variable BOOTSTRAPCFLAGS.
43  */
44 #ifdef hpux
45 #ifdef hp9000s800
46 #define imake_ccflags "-DSYSV"
47 #else
48 #define imake_ccflags "-Wc,-Nd4000,-Ns3000 -DSYSV"
49 #endif
50 #endif
51
52 #if defined(macII) || defined(_AUX_SOURCE)
53 #define imake_ccflags "-DmacII -DSYSV"
54 #endif
55
56 #ifdef stellar
57 #define imake_ccflags "-DSYSV"
58 #endif
59
60 #if defined(USL) || defined(Oki) || defined(NCR)
61 #define imake_ccflags "-Xc -DSVR4"
62 #endif
63
64 #ifdef sony
65 #if defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
66 #define imake_ccflags "-DSVR4"
67 #else
68 #include <sys/param.h>
69 #if NEWSOS < 41
70 #define imake_ccflags "-Dbsd43 -DNOSTDHDRS"
71 #else
72 #if NEWSOS < 42
73 #define imake_ccflags "-Dbsd43"
74 #endif
75 #endif
76 #endif
77 #endif
78
79 #ifdef _CRAY
80 #define imake_ccflags "-DSYSV -DUSG"
81 #endif
82
83 #if defined(_IBMR2) || defined(aix)
84 #define imake_ccflags "-Daix -DSYSV"
85 #endif
86
87 #ifdef Mips
88 #  if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
89 #    define imake_ccflags "-DBSD43"
90 #  else 
91 #    define imake_ccflags "-DSYSV"
92 #  endif
93 #endif 
94
95 #ifdef is68k
96 #define imake_ccflags "-Dluna -Duniosb"
97 #endif
98
99 #ifdef SYSV386
100 # ifdef SVR4
101 #  define imake_ccflags "-Xc -DSVR4"
102 # else
103 #  define imake_ccflags "-DSYSV"
104 # endif
105 #endif
106
107 #ifdef SVR4
108 # ifdef i386
109 #  define imake_ccflags "-Xc -DSVR4"
110 # endif
111 #endif
112
113 #ifdef SYSV
114 # ifdef i386
115 #  define imake_ccflags "-DSYSV"
116 # endif
117 #endif
118
119 #ifdef __convex__
120 #define imake_ccflags "-fn -tm c1"
121 #endif
122
123 #ifdef apollo
124 #define imake_ccflags "-DX_NOT_POSIX"
125 #endif
126
127 #ifdef WIN32
128 #define imake_ccflags "-nologo -batch -D__STDC__"
129 #endif
130
131 #ifdef __uxp__
132 #define imake_ccflags "-DSVR4 -DANSICPP"
133 #endif
134
135 #ifdef __sxg__
136 #define imake_ccflags "-DSYSV -DUSG -DNOSTDHDRS"
137 #endif
138
139 #ifdef sequent
140 #define imake_ccflags "-DX_NOT_STDC_ENV -DX_NOT_POSIX"
141 #endif
142
143 #ifdef _SEQUENT_
144 #define imake_ccflags "-DSYSV -DUSG"
145 #endif
146
147 #if defined(SX) || defined(PC_UX)
148 #define imake_ccflags "-DSYSV"
149 #endif
150
151 #ifdef nec_ews_svr2
152 #define imake_ccflags "-DUSG"
153 #endif
154
155 #if defined(nec_ews_svr4) || defined(_nec_ews_svr4) || defined(_nec_up) || defined(_nec_ft)
156 #define imake_ccflags "-DSVR4"
157 #endif
158
159 #ifdef  MACH
160 #define imake_ccflags "-DNOSTDHDRS"
161 #endif
162
163 /* this is for OS/2 under EMX. This won't work with DOS */
164 #if defined(__EMX__) 
165 #define imake_ccflags "-DBSD43"
166 #endif
167
168 #else /* not CCIMAKE */
169 #ifndef MAKEDEPEND
170 /*
171  * Step 2:  dup2
172  *     If your OS doesn't have a dup2() system call to duplicate one file
173  *     descriptor onto another, define such a mechanism here (if you don't
174  *     already fall under the existing category(ies).
175  */
176 #if defined(SYSV) && !defined(_CRAY) && !defined(Mips) && !defined(_SEQUENT_)
177 #define dup2(fd1,fd2)   ((fd1 == fd2) ? fd1 : (close(fd2), \
178                                                fcntl(fd1, F_DUPFD, fd2)))
179 #endif
180
181
182 /*
183  * Step 3:  FIXUP_CPP_WHITESPACE
184  *     If your cpp collapses tabs macro expansions into a single space and
185  *     replaces escaped newlines with a space, define this symbol.  This will
186  *     cause imake to attempt to patch up the generated Makefile by looking
187  *     for lines that have colons in them (this is why the rules file escapes
188  *     all colons).  One way to tell if you need this is to see whether or not
189  *     your Makefiles have no tabs in them and lots of @@ strings.
190  */
191 #if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || (defined(AMOEBA) && defined(CROSS_COMPILE))
192 #define FIXUP_CPP_WHITESPACE
193 #endif
194 #ifdef WIN32
195 #define REMOVE_CPP_LEADSPACE
196 #define INLINE_SYNTAX
197 #define MAGIC_MAKE_VARS
198 #endif
199 #ifdef __minix_vmd
200 #define FIXUP_CPP_WHITESPACE
201 #endif
202
203 /*
204  * Step 4:  USE_CC_E, DEFAULT_CC, DEFAULT_CPP
205  *     If you want to use cc -E instead of cpp, define USE_CC_E.
206  *     If use cc -E but want a different compiler, define DEFAULT_CC.
207  *     If the cpp you need is not in /lib/cpp, define DEFAULT_CPP.
208  */
209 #ifdef hpux
210 #define USE_CC_E
211 #endif
212 #ifdef WIN32
213 #define USE_CC_E
214 #define DEFAULT_CC "cl"
215 #endif
216 #ifdef apollo
217 #define DEFAULT_CPP "/usr/lib/cpp"
218 #endif
219 #if defined(_IBMR2) && !defined(DEFAULT_CPP)
220 #define DEFAULT_CPP "/usr/lpp/X11/Xamples/util/cpp/cpp"
221 #endif
222 #if defined(sun) && defined(SVR4)
223 #define DEFAULT_CPP "/usr/ccs/lib/cpp"
224 #endif
225 #ifdef __bsdi__
226 #define DEFAULT_CPP "/usr/bin/cpp"
227 #endif
228 #ifdef __uxp__
229 #define DEFAULT_CPP "/usr/ccs/lib/cpp"
230 #endif
231 #ifdef __sxg__
232 #define DEFAULT_CPP "/usr/lib/cpp"
233 #endif
234 #ifdef _CRAY
235 #define DEFAULT_CPP "/lib/pcpp"
236 #endif
237 #if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
238 #define DEFAULT_CPP "/usr/libexec/cpp"
239 #endif
240 #ifdef  MACH
241 #define USE_CC_E
242 #endif
243 #ifdef __minix_vmd
244 #define DEFAULT_CPP "/usr/lib/cpp"
245 #endif
246 #if defined(__EMX__)
247 /* expects cpp in PATH */
248 #define DEFAULT_CPP "cpp"
249 #endif
250
251 /*
252  * Step 5:  cpp_argv
253  *     The following table contains the flags that should be passed
254  *     whenever a Makefile is being generated.  If your preprocessor 
255  *     doesn't predefine any unique symbols, choose one and add it to the
256  *     end of this table.  Then, do the following:
257  * 
258  *         a.  Use this symbol in Imake.tmpl when setting MacroFile.
259  *         b.  Put this symbol in the definition of BootstrapCFlags in your
260  *             <platform>.cf file.
261  *         c.  When doing a make World, always add "BOOTSTRAPCFLAGS=-Dsymbol" 
262  *             to the end of the command line.
263  * 
264  *     Note that you may define more than one symbol (useful for platforms 
265  *     that support multiple operating systems).
266  */
267
268 #define ARGUMENTS 50    /* number of arguments in various arrays */
269 char *cpp_argv[ARGUMENTS] = {
270         "cc",           /* replaced by the actual program to exec */
271         "-I.",          /* add current directory to include path */
272 #ifdef unix
273         "-Uunix",       /* remove unix symbol so that filename unix.c okay */
274 #endif
275 #if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(MACH)
276 # ifdef __i386__
277         "-D__i386__",
278 # endif
279 # ifdef __GNUC__
280         "-traditional"
281 # endif
282 #endif
283 #ifdef M4330
284         "-DM4330",      /* Tektronix */
285 #endif
286 #ifdef M4310
287         "-DM4310",      /* Tektronix */
288 #endif
289 #if defined(macII) || defined(_AUX_SOURCE)
290         "-DmacII",      /* Apple A/UX */
291 #endif
292 #ifdef USL
293         "-DUSL",        /* USL */
294 #endif
295 #ifdef sony
296         "-Dsony",       /* Sony */
297 #if !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV) && NEWSOS < 42
298         "-Dbsd43",
299 #endif
300 #endif
301 #ifdef _IBMR2
302         "-D_IBMR2",     /* IBM RS-6000 (we ensured that aix is defined above */
303 #ifndef aix
304 #define aix             /* allow BOOTSTRAPCFLAGS="-D_IBMR2" */
305 #endif
306 #endif /* _IBMR2 */
307 #ifdef aix
308         "-Daix",        /* AIX instead of AOS */
309 #ifndef ibm
310 #define ibm             /* allow BOOTSTRAPCFLAGS="-Daix" */
311 #endif
312 #endif /* aix */
313 #ifdef ibm
314         "-Dibm",        /* IBM PS/2 and RT under both AOS and AIX */
315 #endif
316 #ifdef luna
317         "-Dluna",       /* OMRON luna 68K and 88K */
318 #ifdef luna1
319         "-Dluna1",
320 #endif
321 #ifdef luna88k          /* need not on UniOS-Mach Vers. 1.13 */
322         "-traditional", /* for some older version            */
323 #endif                  /* instead of "-DXCOMM=\\#"          */
324 #ifdef uniosb
325         "-Duniosb",
326 #endif
327 #ifdef uniosu
328         "-Duniosu",
329 #endif
330 #endif /* luna */
331 #ifdef _CRAY            /* Cray */
332         "-Ucray",
333 #endif
334 #ifdef Mips
335         "-DMips",       /* Define and use Mips for Mips Co. OS/mach. */
336 # if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
337         "-DBSD43",      /* Mips RISCOS supports two environments */
338 # else
339         "-DSYSV",       /* System V environment is the default */
340 # endif
341 #endif /* Mips */
342 #ifdef MOTOROLA
343         "-DMOTOROLA",    /* Motorola Delta Systems */
344 # ifdef SYSV
345         "-DSYSV", 
346 # endif
347 # ifdef SVR4
348         "-DSVR4",
349 # endif
350 #endif /* MOTOROLA */
351 #ifdef i386
352 # ifdef SVR4
353         "-Di386",
354         "-DSVR4",
355 # endif
356 # ifdef SYSV
357         "-Di386",
358         "-DSYSV",
359 #  ifdef ISC
360         "-DISC",
361 #   ifdef ISC40
362         "-DISC40",       /* ISC 4.0 */
363 #   else
364 #    ifdef ISC202
365         "-DISC202",      /* ISC 2.0.2 */
366 #    else
367 #     ifdef ISC30
368         "-DISC30",       /* ISC 3.0 */
369 #     else
370         "-DISC22",       /* ISC 2.2.1 */
371 #     endif
372 #    endif
373 #   endif
374 #  endif
375 #  ifdef SCO
376         "-DSCO",
377 #   ifdef SCO324
378         "-DSCO324",
379 #   endif
380 #  endif
381 # endif
382 # ifdef ESIX
383         "-Di386",
384         "-DESIX",
385 # endif
386 # ifdef ATT
387         "-Di386",
388         "-DATT",
389 # endif
390 # ifdef DELL
391         "-Di386",
392         "-DDELL",
393 # endif
394 #endif
395 #ifdef SYSV386           /* System V/386 folks, obsolete */
396         "-Di386",
397 # ifdef SVR4
398         "-DSVR4",
399 # endif
400 # ifdef ISC
401         "-DISC",
402 #  ifdef ISC40
403         "-DISC40",       /* ISC 4.0 */
404 #  else
405 #   ifdef ISC202
406         "-DISC202",      /* ISC 2.0.2 */
407 #   else
408 #    ifdef ISC30
409         "-DISC30",       /* ISC 3.0 */
410 #    else
411         "-DISC22",       /* ISC 2.2.1 */
412 #    endif
413 #   endif
414 #  endif
415 # endif
416 # ifdef SCO
417         "-DSCO",
418 #  ifdef SCO324
419         "-DSCO324",
420 #  endif
421 # endif
422 # ifdef ESIX
423         "-DESIX",
424 # endif
425 # ifdef ATT
426         "-DATT",
427 # endif
428 # ifdef DELL
429         "-DDELL",
430 # endif
431 #endif
432 #ifdef __osf__
433         "-D__osf__",
434 # ifdef __mips__
435         "-D__mips__",
436 # endif
437 # ifdef __alpha
438         "-D__alpha",
439 # endif
440 # ifdef __i386__
441         "-D__i386__",
442 # endif
443 # ifdef __GNUC__
444         "-traditional"
445 # endif
446 #endif
447 #ifdef Oki
448         "-DOki",
449 #endif
450 #ifdef sun
451 #ifdef SVR4
452         "-DSVR4",
453 #endif
454 #endif
455 #ifdef WIN32
456         "-DWIN32",
457         "-nologo",
458         "-batch",
459         "-D__STDC__",
460 #endif
461 #ifdef NCR
462         "-DNCR",        /* NCR */
463 #endif
464 #ifdef linux
465         "-traditional",
466         "-Dlinux",
467 #endif
468 #ifdef __uxp__
469         "-D__uxp__",
470 #endif
471 #ifdef __sxg__
472         "-D__sxg__",
473 #endif
474 #ifdef nec_ews_svr2
475         "-Dnec_ews_svr2",
476 #endif
477 #ifdef AMOEBA
478         "-DAMOEBA",
479 # ifdef CROSS_COMPILE
480         "-DCROSS_COMPILE",
481 #  ifdef CROSS_i80386
482         "-Di80386",
483 #  endif
484 #  ifdef CROSS_sparc
485         "-Dsparc",
486 #  endif
487 #  ifdef CROSS_mc68000
488         "-Dmc68000",
489 #  endif
490 # else
491 #  ifdef i80386
492         "-Di80386",
493 #  endif
494 #  ifdef sparc
495         "-Dsparc",
496 #  endif
497 #  ifdef mc68000
498         "-Dmc68000",
499 #  endif
500 # endif
501 #endif
502 #ifdef __minix_vmd
503         "-Dminix",
504 #endif
505
506 #if defined(__EMX__)
507         "-traditional",
508         "-Demxos2",
509 #endif
510
511 };
512 #else /* else MAKEDEPEND */
513 /*
514  * Step 6:  predefs
515  *     If your compiler and/or preprocessor define any specific symbols, add
516  *     them to the the following table.  The definition of struct symtab is
517  *     in util/makedepend/def.h.
518  */
519 struct symtab   predefs[] = {
520 #ifdef apollo
521         {"apollo", "1"},
522 #endif
523 #ifdef ibm032
524         {"ibm032", "1"},
525 #endif
526 #ifdef ibm
527         {"ibm", "1"},
528 #endif
529 #ifdef aix
530         {"aix", "1"},
531 #endif
532 #ifdef sun
533         {"sun", "1"},
534 #endif
535 #ifdef sun2
536         {"sun2", "1"},
537 #endif
538 #ifdef sun3
539         {"sun3", "1"},
540 #endif
541 #ifdef sun4
542         {"sun4", "1"},
543 #endif
544 #ifdef sparc
545         {"sparc", "1"},
546 #endif
547 #ifdef __sparc__
548         {"__sparc__", "1"},
549 #endif
550 #ifdef hpux
551         {"hpux", "1"},
552 #endif
553 #ifdef __hpux
554         {"__hpux", "1"},
555 #endif
556 #ifdef __hp9000s800
557         {"__hp9000s800", "1"},
558 #endif
559 #ifdef __hp9000s700
560         {"__hp9000s700", "1"},
561 #endif
562 #ifdef vax
563         {"vax", "1"},
564 #endif
565 #ifdef VMS
566         {"VMS", "1"},
567 #endif
568 #ifdef cray
569         {"cray", "1"},
570 #endif
571 #ifdef CRAY
572         {"CRAY", "1"},
573 #endif
574 #ifdef _CRAY
575         {"_CRAY", "1"},
576 #endif
577 #ifdef att
578         {"att", "1"},
579 #endif
580 #ifdef mips
581         {"mips", "1"},
582 #endif
583 #ifdef __mips__
584         {"__mips__", "1"},
585 #endif
586 #ifdef ultrix
587         {"ultrix", "1"},
588 #endif
589 #ifdef stellar
590         {"stellar", "1"},
591 #endif
592 #ifdef mc68000
593         {"mc68000", "1"},
594 #endif
595 #ifdef mc68020
596         {"mc68020", "1"},
597 #endif
598 #ifdef __GNUC__
599         {(char *)"__GNUC__", (char *)"1"},
600 #endif
601 #if __STDC__
602         {(char *)"__STDC__", (char *)"1"},
603 #endif
604 #ifdef __HIGHC__
605         {"__HIGHC__", "1"},
606 #endif
607 #ifdef CMU
608         {"CMU", "1"},
609 #endif
610 #ifdef luna
611         {"luna", "1"},
612 #ifdef luna1
613         {"luna1", "1"},
614 #endif
615 #ifdef luna2
616         {"luna2", "1"},
617 #endif
618 #ifdef luna88k
619         {"luna88k", "1"},
620 #endif
621 #ifdef uniosb
622         {"uniosb", "1"},
623 #endif
624 #ifdef uniosu
625         {"uniosu", "1"},
626 #endif
627 #endif
628 #ifdef ieeep754
629         {"ieeep754", "1"},
630 #endif
631 #ifdef is68k
632         {"is68k", "1"},
633 #endif
634 #ifdef m68k
635         {"m68k", "1"},
636 #endif
637 #ifdef m88k
638         {"m88k", "1"},
639 #endif
640 #ifdef __m88k__
641         {"__m88k__", "1"},
642 #endif
643 #ifdef bsd43
644         {"bsd43", "1"},
645 #endif
646 #ifdef hcx
647         {"hcx", "1"},
648 #endif
649 #ifdef sony
650         {"sony", "1"},
651 #ifdef SYSTYPE_SYSV
652         {"SYSTYPE_SYSV", "1"},
653 #endif
654 #ifdef _SYSTYPE_SYSV
655         {"_SYSTYPE_SYSV", "1"},
656 #endif
657 #endif
658 #ifdef __OSF__
659         {"__OSF__", "1"},
660 #endif
661 #ifdef __osf__
662         {"__osf__", "1"},
663 #endif
664 #ifdef __alpha
665         {"__alpha", "1"},
666 #endif
667 #ifdef __DECC
668         {"__DECC",  "1"},
669 #endif
670 #ifdef __decc
671         {"__decc",  "1"},
672 #endif
673 #ifdef __uxp__
674         {"__uxp__", "1"},
675 #endif
676 #ifdef __sxg__
677         {"__sxg__", "1"},
678 #endif
679 #ifdef _SEQUENT_
680         {"_SEQUENT_", "1"},
681         {"__STDC__", "1"},
682 #endif
683 #ifdef __bsdi__
684         {"__bsdi__", "1"},
685 #endif
686 #ifdef nec_ews_svr2
687         {"nec_ews_svr2", "1"},
688 #endif
689 #ifdef nec_ews_svr4
690         {"nec_ews_svr4", "1"},
691 #endif
692 #ifdef _nec_ews_svr4
693         {"_nec_ews_svr4", "1"},
694 #endif
695 #ifdef _nec_up
696         {"_nec_up", "1"},
697 #endif
698 #ifdef SX
699         {"SX", "1"},
700 #endif
701 #ifdef nec
702         {"nec", "1"},
703 #endif
704 #ifdef _nec_ft
705         {"_nec_ft", "1"},
706 #endif
707 #ifdef PC_UX
708         {(char *)"PC_UX", (char *)"1"},
709 #endif
710 #ifdef __EMX__
711         {"__EMX__", "1"},
712 #endif
713         /* add any additional symbols before this line */
714         {NULL, NULL}
715 };
716
717 #endif /* MAKEDEPEND */
718 #endif /* CCIMAKE */