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