FreeBSD 10 clang port
[oweals/cde.git] / cde / config / imake / imakemdep.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $TOG: imakemdep.h /main/102 1998/02/06 11:02:26 kaleb $ */
24 /*
25
26 Copyright (c) 1993, 1994, 1998  The Open Group
27
28 All Rights Reserved.
29
30 The above copyright notice and this permission notice shall be included in
31 all copies or substantial portions of the Software.
32
33 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
34 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
35 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
36 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
37 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39
40 Except as contained in this notice, the name of The Open Group shall not be
41 used in advertising or otherwise to promote the sale, use or other dealings
42 in this Software without prior written authorization from The Open Group.
43
44 */
45
46
47 /* 
48  * This file contains machine-dependent constants for the imake utility.
49  * When porting imake, read each of the steps below and add in any necessary
50  * definitions.  In general you should *not* edit ccimake.c or imake.c!
51  */
52
53 #ifdef CCIMAKE
54 /*
55  * Step 1:  imake_ccflags
56  *     Define any special flags that will be needed to get imake.c to compile.
57  *     These will be passed to the compile along with the contents of the
58  *     make variable BOOTSTRAPCFLAGS.
59  */
60 #ifdef hpux
61 #ifdef hp9000s800
62 #define imake_ccflags "-DSYSV"
63 #else
64 #define imake_ccflags "-Wc,-Nd4000,-Ns3000 -DSYSV"
65 #endif
66 #endif
67
68 #if defined(macII) || defined(_AUX_SOURCE)
69 #define imake_ccflags "-DmacII -DSYSV"
70 #endif
71
72 #ifdef stellar
73 #define imake_ccflags "-DSYSV"
74 #endif
75
76 #if defined(USL) || defined(__USLC__) || defined(Oki) || defined(NCR)
77 #define imake_ccflags "-Xa -DSVR4"
78 #endif
79
80 /* SCO may define __USLC__ so put this after the USL check */
81 #if defined(M_UNIX) || defined(_SCO_DS)
82 #ifdef imake_ccflags
83 #undef imake_ccflags
84 #endif
85 #define imake_ccflags "-Dsco"
86 #endif
87
88 #ifdef sony
89 #if defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
90 #define imake_ccflags "-DSVR4"
91 #else
92 #include <sys/param.h>
93 #if NEWSOS < 41
94 #define imake_ccflags "-Dbsd43 -DNOSTDHDRS"
95 #else
96 #if NEWSOS < 42
97 #define imake_ccflags "-Dbsd43"
98 #endif
99 #endif
100 #endif
101 #endif
102
103 #ifdef _CRAY
104 #define imake_ccflags "-DSYSV -DUSG"
105 #endif
106
107 #if defined(_IBMR2) || defined(aix)
108 #define imake_ccflags "-Daix -DSYSV"
109 #endif
110
111 #ifdef Mips
112 #  if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
113 #    define imake_ccflags "-DBSD43"
114 #  else 
115 #    define imake_ccflags "-DSYSV"
116 #  endif
117 #endif 
118
119 #ifdef is68k
120 #define imake_ccflags "-Dluna -Duniosb"
121 #endif
122
123 #ifdef SYSV386
124 # ifdef SVR4
125 #  define imake_ccflags "-Xa -DSVR4"
126 # else
127 #  define imake_ccflags "-DSYSV"
128 # endif
129 #endif
130
131 #ifdef SVR4
132 # ifdef i386
133 #  define imake_ccflags "-Xa -DSVR4"
134 # endif
135 #endif
136
137 #ifdef SYSV
138 # ifdef i386
139 #  define imake_ccflags "-DSYSV"
140 # endif
141 #endif
142
143 #ifdef __convex__
144 #define imake_ccflags "-fn -tm c1"
145 #endif
146
147 #ifdef apollo
148 #define imake_ccflags "-DX_NOT_POSIX"
149 #endif
150
151 #ifdef WIN32
152 #if _MSC_VER < 1000
153 #define imake_ccflags "-nologo -batch -D__STDC__"
154 #else
155 #define imake_ccflags "-nologo -D__STDC__"
156 #endif
157 #endif
158
159 #ifdef __uxp__
160 #define imake_ccflags "-DSVR4 -DANSICPP"
161 #endif
162
163 #ifdef __sxg__
164 #define imake_ccflags "-DSYSV -DUSG -DNOSTDHDRS"
165 #endif
166
167 #ifdef sequent
168 #define imake_ccflags "-DX_NOT_STDC_ENV -DX_NOT_POSIX"
169 #endif
170
171 #ifdef _SEQUENT_
172 #define imake_ccflags "-DSYSV -DUSG"
173 #endif
174
175 #if defined(SX) || defined(PC_UX)
176 #define imake_ccflags "-DSYSV"
177 #endif
178
179 #ifdef nec_ews_svr2
180 #define imake_ccflags "-DUSG"
181 #endif
182
183 #if defined(nec_ews_svr4) || defined(_nec_ews_svr4) || defined(_nec_up) || defined(_nec_ft)
184 #define imake_ccflags "-DSVR4"
185 #endif
186
187 #ifdef  MACH
188 #define imake_ccflags "-DNOSTDHDRS"
189 #endif
190
191 #ifdef  __FreeBSD__
192 #include <sys/param.h>
193 #if defined(__FreeBSD_version)
194 #if __FreeBSD_version < 500000
195 #define imake_ccflags "-DCPP_IN_LIBEXEC"
196 #endif
197 #else
198 #define imake_ccflags "-DCPP_IN_LIBEXEC"
199 #endif
200 #endif
201
202 /* this is for OS/2 under EMX. This won't work with DOS */
203 #if defined(__EMX__)
204 #define imake_ccflags "-DBSD43"
205 #endif
206
207 #else /* not CCIMAKE */
208 #ifndef MAKEDEPEND
209 /*
210  * Step 2:  dup2
211  *     If your OS doesn't have a dup2() system call to duplicate one file
212  *     descriptor onto another, define such a mechanism here (if you don't
213  *     already fall under the existing category(ies).
214  */
215 #if defined(SYSV) && !defined(_CRAY) && !defined(Mips) && !defined(_SEQUENT_) && !defined(sco)
216 #define dup2(fd1,fd2)   ((fd1 == fd2) ? fd1 : (close(fd2), \
217                                                fcntl(fd1, F_DUPFD, fd2)))
218 #endif
219
220
221 /*
222  * Step 3:  FIXUP_CPP_WHITESPACE
223  *     If your cpp collapses tabs macro expansions into a single space and
224  *     replaces escaped newlines with a space, define this symbol.  This will
225  *     cause imake to attempt to patch up the generated Makefile by looking
226  *     for lines that have colons in them (this is why the rules file escapes
227  *     all colons).  One way to tell if you need this is to see whether or not
228  *     your Makefiles have no tabs in them and lots of @@ strings.
229  */
230 #if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || defined(sco) || defined(__llvm__) || (defined(AMOEBA) && defined(CROSS_COMPILE))
231 #define FIXUP_CPP_WHITESPACE
232 #endif
233 #ifdef WIN32
234 #define REMOVE_CPP_LEADSPACE
235 #define INLINE_SYNTAX
236 #define MAGIC_MAKE_VARS
237 #endif
238
239 /*
240  * Step 4:  USE_CC_E, DEFAULT_CC, DEFAULT_CPP
241  *     If you want to use cc -E instead of cpp, define USE_CC_E.
242  *     If use cc -E but want a different compiler, define DEFAULT_CC.
243  *     If the cpp you need is not in /lib/cpp, define DEFAULT_CPP.
244  */
245 #ifdef hpux
246 #define USE_CC_E
247 #endif
248 #ifdef WIN32
249 #define USE_CC_E
250 #define DEFAULT_CC "cl"
251 #endif
252 #ifdef apollo
253 #define DEFAULT_CPP "/usr/lib/cpp"
254 #endif
255 #if defined(_IBMR2) && !defined(DEFAULT_CPP)
256 #define DEFAULT_CPP "/usr/ccs/lib/cpp"
257 #endif
258 #if defined(sun) && (defined(SVR4) || defined(__svr4__) || defined(__SVR4) || defined(__sol__))
259 #define DEFAULT_CPP "/usr/ccs/lib/cpp"
260 #endif
261 #if defined(__bsdi__) || defined(__NetBSD__) \
262         || (defined(__FreeBSD__) && !defined(CPP_IN_LIBEXEC))
263 #define DEFAULT_CPP "/usr/bin/cpp"
264 #endif
265 #ifdef __uxp__
266 #define DEFAULT_CPP "/usr/ccs/lib/cpp"
267 #endif
268 #ifdef __sxg__
269 #define DEFAULT_CPP "/usr/lib/cpp"
270 #endif
271 #ifdef _CRAY
272 #define DEFAULT_CPP "/lib/pcpp"
273 #endif
274 #if defined(__386BSD__) || defined(__OpenBSD__) \
275         || (defined(__FreeBSD__) && defined(CPP_IN_LIBEXEC))
276 #define DEFAULT_CPP "/usr/libexec/cpp"
277 #endif
278 #if defined(__FreeBSD__) && (__FreeBSD__ >= 10) && !defined(__llvm__)
279 #undef DEFAULT_CPP
280 #endif
281 #if defined(__sgi) && defined(__ANSI_CPP__)
282 #define USE_CC_E
283 #endif
284 #ifdef  MACH
285 #define USE_CC_E
286 #endif
287 #ifdef __minix_vmd
288 #define DEFAULT_CPP "/usr/lib/cpp"
289 #endif
290 #if defined(__EMX__)
291 /* expects cpp in PATH */
292 #define DEFAULT_CPP "cpp"
293 #endif
294
295 /*
296  * Step 5:  cpp_argv
297  *     The following table contains the flags that should be passed
298  *     whenever a Makefile is being generated.  If your preprocessor 
299  *     doesn't predefine any unique symbols, choose one and add it to the
300  *     end of this table.  Then, do the following:
301  * 
302  *         a.  Use this symbol in Imake.tmpl when setting MacroFile.
303  *         b.  Put this symbol in the definition of BootstrapCFlags in your
304  *             <platform>.cf file.
305  *         c.  When doing a make World, always add "BOOTSTRAPCFLAGS=-Dsymbol" 
306  *             to the end of the command line.
307  * 
308  *     Note that you may define more than one symbol (useful for platforms 
309  *     that support multiple operating systems).
310  */
311
312 #define ARGUMENTS 50    /* number of arguments in various arrays */
313 char *cpp_argv[ARGUMENTS] = {
314         "cc",           /* replaced by the actual program to exec */
315         "-I.",          /* add current directory to include path */
316 #ifdef unix
317         "-Uunix",       /* remove unix symbol so that filename unix.c okay */
318 #endif
319 #if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(MACH) || defined(USL) || defined(sco) || defined(ISC) || defined(__bsdi__) || defined(linux) || defined(__hpux__) || defined(__vxworks)
320 # ifdef __i386__
321         "-D__i386__",
322 # endif
323 # ifdef __i486__
324         "-D__i486__",
325 # endif
326 # ifdef __i586__
327         "-D__i586__",
328 # endif
329 # ifdef __i686__
330         "-D__i686__",
331 # endif
332 # ifdef __k6__
333         "-D__k6__",
334 # endif
335 # ifdef __ia64__
336         "-D__ia64__",
337 # endif
338 # ifdef __amd64__
339         "-D__amd64__",
340 # endif
341 # ifdef __x86_64__
342         "-D__amd64__",
343 # endif
344 # ifdef __ppc__
345         {"-D__powerpc__", "1"},
346 # endif
347 # ifdef __ppc64__
348         {"-D__powerpc64__", "1"},
349 # endif
350 # ifdef __powerpc__
351         {"-D__powerpc__", "1"},
352 # endif
353 # ifdef __powerpc64__
354         {"-D__powerpc64__", "1"},
355 # endif
356
357 # ifdef __GNUC__
358         "-traditional",
359 # endif
360 # ifdef __llvm__
361         "-fms-extensions",
362         "-Wno-invalid-token-paste",
363         "-Wno-invalid-pp-token",
364 # endif
365 #endif
366
367 #ifdef M4330
368         "-DM4330",      /* Tektronix */
369 #endif
370 #ifdef M4310
371         "-DM4310",      /* Tektronix */
372 #endif
373 #if defined(macII) || defined(_AUX_SOURCE)
374         "-DmacII",      /* Apple A/UX */
375 #endif
376 #if defined(USL) || defined(__USLC__)
377         "-DUSL",        /* USL */
378 #endif
379 #ifdef sony
380         "-Dsony",       /* Sony */
381 #if !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV) && NEWSOS < 42
382         "-Dbsd43",
383 #endif
384 #endif
385 #ifdef _IBMR2
386         "-D_IBMR2",     /* IBM RS-6000 (we ensured that aix is defined above */
387 #ifndef aix
388 #define aix             /* allow BOOTSTRAPCFLAGS="-D_IBMR2" */
389 #endif
390 #endif /* _IBMR2 */
391 #ifdef aix
392         "-Daix",        /* AIX instead of AOS */
393 #ifndef ibm
394 #define ibm             /* allow BOOTSTRAPCFLAGS="-Daix" */
395 #endif
396 #endif /* aix */
397 #ifdef ibm
398         "-Dibm",        /* IBM PS/2 and RT under both AOS and AIX */
399 #endif
400 #ifdef luna
401         "-Dluna",       /* OMRON luna 68K and 88K */
402 #ifdef luna1
403         "-Dluna1",
404 #endif
405 #ifdef luna88k          /* need not on UniOS-Mach Vers. 1.13 */
406         "-traditional", /* for some older version            */
407 #endif                  /* instead of "-DXCOMM=\\#"          */
408 #ifdef uniosb
409         "-Duniosb",
410 #endif
411 #ifdef uniosu
412         "-Duniosu",
413 #endif
414 #endif /* luna */
415 #ifdef _CRAY            /* Cray */
416         "-Ucray",
417 #endif
418 #ifdef Mips
419         "-DMips",       /* Define and use Mips for Mips Co. OS/mach. */
420 # if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
421         "-DBSD43",      /* Mips RISCOS supports two environments */
422 # else
423         "-DSYSV",       /* System V environment is the default */
424 # endif
425 #endif /* Mips */
426 #ifdef MOTOROLA
427         "-DMOTOROLA",    /* Motorola Delta Systems */
428 # ifdef SYSV
429         "-DSYSV", 
430 # endif
431 # ifdef SVR4
432         "-DSVR4",
433 # endif
434 #endif /* MOTOROLA */
435 #if defined(M_UNIX) || defined(sco)
436         "-Dsco",
437 # if defined(sco324)
438         "-Dsco324",
439 # endif
440 #endif
441 #ifdef i386
442         "-Di386",
443 # ifdef SVR4
444         "-DSVR4",
445 # endif
446 # ifdef SYSV
447         "-DSYSV",
448 #  ifdef ISC
449         "-DISC",
450 #   ifdef ISC40
451         "-DISC40",       /* ISC 4.0 */
452 #   else
453 #    ifdef ISC202
454         "-DISC202",      /* ISC 2.0.2 */
455 #    else
456 #     ifdef ISC30
457         "-DISC30",       /* ISC 3.0 */
458 #     else
459         "-DISC22",       /* ISC 2.2.1 */
460 #     endif
461 #    endif
462 #   endif
463 #  endif
464 #  ifdef SCO
465         "-DSCO",
466 #   ifdef SCO324
467         "-DSCO324",
468 #   endif
469 #  endif
470 #  ifdef ESIX
471         "-DESIX",
472 #  endif
473 #  ifdef ATT
474         "-DATT",
475 #  endif
476 #  ifdef DELL
477         "-DDELL",
478 #  endif
479 # endif
480 #endif
481 #ifdef SYSV386          /* System V/386 folks, obsolete */
482         "-Di386",
483 # ifdef SVR4
484         "-DSVR4",
485 # endif
486 # ifdef SYSV
487         "-DSYSV",
488 #  ifdef ISC
489         "-DISC",
490 #   ifdef ISC40
491         "-DISC40",       /* ISC 4.0 */
492 #   else
493 #    ifdef ISC202
494         "-DISC202",      /* ISC 2.0.2 */
495 #    else
496 #     ifdef ISC30
497         "-DISC30",       /* ISC 3.0 */
498 #     else
499         "-DISC22",       /* ISC 2.2.1 */
500 #     endif
501 #    endif
502 #   endif
503 #  endif
504 #  ifdef SCO
505         "-DSCO",
506 #   ifdef SCO324
507         "-DSCO324",
508 #   endif
509 #  endif
510 #  ifdef ESIX
511         "-DESIX",
512 #  endif
513 #  ifdef ATT
514         "-DATT",
515 #  endif
516 #  ifdef DELL
517         "-DDELL",
518 #  endif
519 # endif
520 #endif
521 #ifdef __osf__
522         "-D__osf__",
523 # ifdef __mips__
524         "-D__mips__",
525 # endif
526 # ifdef __alpha
527         "-D__alpha",
528 # endif
529 # ifdef __i386__
530         "-D__i386__",
531 # endif
532 # ifdef __GNUC__
533         "-traditional",
534 # endif
535 #endif
536 #ifdef Oki
537         "-DOki",
538 #endif
539 #ifdef sun
540 #if defined(SVR4) || defined(__svr4__) || defined(__SVR4) || defined(__sol__)
541         "-DSVR4",
542 #endif
543 #endif
544 #ifdef WIN32
545         "-DWIN32",
546         "-nologo",
547 #if _MSC_VER < 1000
548         "-batch",
549 #endif
550         "-D__STDC__",
551 #endif
552 #ifdef NCR
553         "-DNCR",        /* NCR */
554 #endif
555 #ifdef linux
556         "-traditional",
557         "-Dlinux",
558 #endif
559 #ifdef __uxp__
560         "-D__uxp__",
561 #endif
562 #ifdef __sxg__
563         "-D__sxg__",
564 #endif
565 #ifdef nec_ews_svr2
566         "-Dnec_ews_svr2",
567 #endif
568 #ifdef AMOEBA
569         "-DAMOEBA",
570 # ifdef CROSS_COMPILE
571         "-DCROSS_COMPILE",
572 #  ifdef CROSS_i80386
573         "-DCROSS_i80386",
574 #  endif
575 #  ifdef CROSS_sparc
576         "-DCROSS_sparc",
577 #  endif
578 #  ifdef CROSS_mc68000
579         "-DCROSS_mc68000",
580 #  endif
581 # else
582 #  ifdef i80386
583         "-Di80386",
584 #  endif
585 #  ifdef sparc
586         "-Dsparc",
587 #  endif
588 #  ifdef mc68000
589         "-Dmc68000",
590 #  endif
591 # endif
592 #endif
593 #if defined(__sgi) && defined(__ANSI_CPP__)
594         "-cckr",
595 #endif
596 #ifdef __minix_vmd
597         "-Dminix",
598 #endif
599
600 #if defined(__EMX__)
601         "-traditional",
602         "-Demxos2",
603 #endif
604
605 };
606
607
608 /*
609  * Step 6: DEFAULT_OS_MAJOR_REV, DEFAULT_OS_MINOR_REV, DEFAULT_OS_TEENY_REV,
610  *      and DEFAULT_OS_NAME.
611  *      If your systems provides a way to generate the default major,
612  *      minor, teeny, or system names at runtime add commands below.
613  *      The syntax of the _REV strings is 'f fmt' where 'f' is an argument
614  *      you would give to uname, and "fmt" is a scanf() format string.
615  *      Supported uname arguments are "snrvm", and if you specify multiple
616  *      arguments they will be separated by spaces.  No more than 5 arguments
617  *      may be given.  Unlike uname() order of arguments matters.
618  */
619 #if defined(aix)
620 /* uname -v returns "x" (e.g. "4"), and uname -r returns "y" (e.g. "1") */
621 # define DEFAULT_OS_MAJOR_REV   "v %[0-9]"
622 # define DEFAULT_OS_MINOR_REV   "r %[0-9]"
623 /* No information available to generate default OSTeenyVersion value. */
624 # define DEFAULT_OS_NAME        "srvm %[^\n]"
625 #elif defined(sun) || defined(sgi) || defined(ultrix) || defined(__uxp__) || defined(linux) || defined(sony)
626 /* uname -r returns "x.y[.z]", e.g. "5.4" or "4.1.3" */
627 # define DEFAULT_OS_MAJOR_REV   "r %[0-9]"
628 # define DEFAULT_OS_MINOR_REV   "r %*d.%[0-9]"
629 # define DEFAULT_OS_TEENY_REV   "r %*d.%*d.%[0-9]"
630 # define DEFAULT_OS_NAME        "srvm %[^\n]"
631 #elif defined(hpux)
632 /* uname -r returns "W.x.yz", e.g. "B.10.01" */
633 # define DEFAULT_OS_MAJOR_REV   "r %*[^.].%[0-9]"
634 # define DEFAULT_OS_MINOR_REV   "r %*[^.].%*d.%1s"
635 # define DEFAULT_OS_TEENY_REV   "r %*[^.].%*d.%*c%[0-9]"
636 # define DEFAULT_OS_NAME        "srvm %[^\n]"
637 #elif defined(USL) || defined(__USLC__)
638 /* uname -v returns "x.yz" or "x.y.z", e.g. "2.02" or "2.1.2". */
639 # define DEFAULT_OS_MAJOR_REV   "v %[0-9]"
640 # define DEFAULT_OS_MINOR_REV   "v %*d.%1s"
641 # define DEFAULT_OS_TEENY_REV   "v %*d.%*c%[.0-9]"
642 # define DEFAULT_OS_NAME        "srvm %[^\n]"
643 #elif defined(__osf__)
644 /* uname -r returns "Wx.y", e.g. "V3.2" or "T4.0" */
645 # define DEFAULT_OS_MAJOR_REV   "r %*[^0-9]%[0-9]"
646 # define DEFAULT_OS_MINOR_REV   "r %*[^.].%[0-9]"
647 # define DEFAULT_OS_NAME        "srvm %[^\n]"
648 #elif defined(__uxp__)
649 /* NOTE: "x.y[.z]" above handles UXP/DF.  This is a sample alternative. */
650 /* uname -v returns "VxLy Yzzzzz ....", e.g. "V20L10 Y95021 Increment 5 ..." */
651 # define DEFAULT_OS_MAJOR_REV   "v V%[0-9]"
652 # define DEFAULT_OS_MINOR_REV   "v V%*dL%[0-9]"
653 # define DEFAULT_OS_NAME        "srvm %[^\n]"
654 #elif defined(__FreeBSD__)
655 /* uname -r returns "x.y[.z]-mumble", e.g. "9.0-RELEASE" or "11.0-CURRENT" */
656 # define DEFAULT_OS_MAJOR_REV   "r %[0-9]"
657 # define DEFAULT_OS_MINOR_REV   "r %*d.%[0-9]"
658 # define DEFAULT_OS_TEENY_REV   "v %*s %*s %*s r%[0-9]"
659 # define DEFAULT_OS_NAME        "srm %[^\n]"
660 #elif defined(__NetBSD__)
661 /* 386BSD, and BSD/OS too? */
662 /* uname -r returns "x.y[.z]-mumble", e.g. "2.1.5-RELEASE" or "2.2-0801SNAP" */
663 # define DEFAULT_OS_MAJOR_REV   "r %[0-9]"
664 # define DEFAULT_OS_MINOR_REV   "r %*d.%[0-9]"
665 # define DEFAULT_OS_TEENY_REV   "r %*d.%*d.%[0-9]"
666 # define DEFAULT_OS_NAME        "srm %[^\n]"
667 #elif defined(__OpenBSD__)
668 # define DEFAULT_OS_MAJOR_REV   "r %[0-9]"
669 # define DEFAULT_OS_MINOR_REV   "r %*d.%[0-9]"
670 # define DEFAULT_OS_NAME        "srm %[^\n]"
671 #endif
672
673 #else /* else MAKEDEPEND */
674 /*
675  * Step 7:  predefs
676  *     If your compiler and/or preprocessor define any specific symbols, add
677  *     them to the the following table.  The definition of struct symtab is
678  *     in util/makedepend/def.h.
679  */
680 #undef DEF_EVALUATE
681 #undef DEF_STRINGIFY
682 #define DEF_EVALUATE(__x) #__x
683 #define DEF_STRINGIFY(_x) DEF_EVALUATE(_x)
684
685 struct symtab   predefs[] = {
686 #ifdef apollo
687         {"apollo", "1"},
688 #endif
689 #ifdef ibm032
690         {"ibm032", "1"},
691 #endif
692 #ifdef ibm
693         {"ibm", "1"},
694 #endif
695 #ifdef aix
696         {"aix", "1"},
697 #endif
698 #ifdef sun
699         {"sun", "1"},
700 #endif
701 #ifdef sun2
702         {"sun2", "1"},
703 #endif
704 #ifdef sun3
705         {"sun3", "1"},
706 #endif
707 #ifdef sun4
708         {"sun4", "1"},
709 #endif
710 #ifdef sparc
711         {"sparc", "1"},
712 #endif
713 #ifdef __sparc__
714         {"__sparc__", "1"},
715 #endif
716 #ifdef hpux
717         {"hpux", "1"},
718 #endif
719 #ifdef __hpux
720         {"__hpux", "1"},
721 #endif
722 #ifdef __hp9000s800
723         {"__hp9000s800", "1"},
724 #endif
725 #ifdef __hp9000s700
726         {"__hp9000s700", "1"},
727 #endif
728 #ifdef vax
729         {"vax", "1"},
730 #endif
731 #ifdef VMS
732         {"VMS", "1"},
733 #endif
734 #ifdef cray
735         {"cray", "1"},
736 #endif
737 #ifdef CRAY
738         {"CRAY", "1"},
739 #endif
740 #ifdef _CRAY
741         {"_CRAY", "1"},
742 #endif
743 #ifdef att
744         {"att", "1"},
745 #endif
746 #ifdef mips
747         {"mips", "1"},
748 #endif
749 #ifdef __mips__
750         {"__mips__", "1"},
751 #endif
752 #ifdef ultrix
753         {"ultrix", "1"},
754 #endif
755 #ifdef stellar
756         {"stellar", "1"},
757 #endif
758 #ifdef mc68000
759         {"mc68000", "1"},
760 #endif
761 #ifdef mc68020
762         {"mc68020", "1"},
763 #endif
764 #if defined(__GNUC__) && !defined(linux)
765         {"__GNUC__", DEF_STRINGIFY(__GNUC__)},
766 #endif
767 #ifdef __GNUC_MINOR__
768         {"__GNUC_MINOR__", DEF_STRINGIFY(__GNUC_MINOR__)},
769 #endif
770 #if __STDC__
771         {"__STDC__", "1"},
772 #endif
773 #ifdef __HIGHC__
774         {"__HIGHC__", "1"},
775 #endif
776 #ifdef CMU
777         {"CMU", "1"},
778 #endif
779 #ifdef luna
780         {"luna", "1"},
781 #ifdef luna1
782         {"luna1", "1"},
783 #endif
784 #ifdef luna2
785         {"luna2", "1"},
786 #endif
787 #ifdef luna88k
788         {"luna88k", "1"},
789 #endif
790 #ifdef uniosb
791         {"uniosb", "1"},
792 #endif
793 #ifdef uniosu
794         {"uniosu", "1"},
795 #endif
796 #endif
797 #ifdef ieeep754
798         {"ieeep754", "1"},
799 #endif
800 #ifdef is68k
801         {"is68k", "1"},
802 #endif
803 #ifdef m68k
804         {"m68k", "1"},
805 #endif
806 #ifdef m88k
807         {"m88k", "1"},
808 #endif
809 #ifdef __m88k__
810         {"__m88k__", "1"},
811 #endif
812 #ifdef bsd43
813         {"bsd43", "1"},
814 #endif
815 #ifdef hcx
816         {"hcx", "1"},
817 #endif
818 #ifdef sony
819         {"sony", "1"},
820 #ifdef SYSTYPE_SYSV
821         {"SYSTYPE_SYSV", "1"},
822 #endif
823 #ifdef _SYSTYPE_SYSV
824         {"_SYSTYPE_SYSV", "1"},
825 #endif
826 #endif
827 #ifdef __OSF__
828         {"__OSF__", "1"},
829 #endif
830 #ifdef __osf__
831         {"__osf__", "1"},
832 #endif
833 #ifdef __alpha
834         {"__alpha", "1"},
835 #endif
836 #ifdef __DECC
837         {"__DECC",  "1"},
838 #endif
839 #ifdef __decc
840         {"__decc",  "1"},
841 #endif
842 #ifdef __unix__
843         {"__unix__", "1"},
844 #endif
845 #ifdef __uxp__
846         {"__uxp__", "1"},
847 #endif
848 #ifdef __sxg__
849         {"__sxg__", "1"},
850 #endif
851 #ifdef _SEQUENT_
852         {"_SEQUENT_", "1"},
853         {"__STDC__", "1"},
854 #endif
855 #ifdef __bsdi__
856         {"__bsdi__", "1"},
857 #endif
858 #ifdef nec_ews_svr2
859         {"nec_ews_svr2", "1"},
860 #endif
861 #ifdef nec_ews_svr4
862         {"nec_ews_svr4", "1"},
863 #endif
864 #ifdef _nec_ews_svr4
865         {"_nec_ews_svr4", "1"},
866 #endif
867 #ifdef _nec_up
868         {"_nec_up", "1"},
869 #endif
870 #ifdef SX
871         {"SX", "1"},
872 #endif
873 #ifdef nec
874         {"nec", "1"},
875 #endif
876 #ifdef _nec_ft
877         {"_nec_ft", "1"},
878 #endif
879 #ifdef PC_UX
880         {"PC_UX", "1"},
881 #endif
882 #ifdef sgi
883         {"sgi", "1"},
884 #endif
885 #ifdef __sgi
886         {"__sgi", "1"},
887 #endif
888 #ifdef __FreeBSD__
889         {"__FreeBSD__", "1"},
890 #endif
891 #ifdef __OpenBSD__
892         {"__OpenBSD__", "1"},
893 #endif
894 #ifdef __NetBSD__
895         {"__NetBSD__", "1"},
896 #endif
897 #ifdef __EMX__
898         {"__EMX__", "1"},
899 #endif
900 # ifdef ia64
901         {"ia64", "1"},
902 # endif
903 # ifdef __ia64__
904         {"__ia64__", "1"},
905 # endif
906 # if defined (amd64) || defined (x86_64)
907         {"amd64", "1"},
908         {"x86_64", "1"},
909 # endif
910 # if defined (__amd64__) || defined (__x86_64__)
911         {"__amd64__", "1"},
912         {"__x86_64__", "1"},
913 # endif
914 # ifdef __i386
915         {"__i386", "1"},
916 # endif
917 # ifdef __i386__
918         {"__i386__", "1"},
919 # endif
920 # ifdef __i486__
921         {"__i486__", "1"},
922 # endif
923 # ifdef __i586__
924         {"__i586__", "1"},
925 # endif
926 # ifdef __i686__
927         {"__i686__", "1"},
928 # endif
929 # ifdef __k6__
930         {"__k6__", "1"},
931 # endif
932 # ifdef i386
933         {"i386", "1"},
934 # endif
935 # ifdef i486
936         {"i486", "1"},
937 # endif
938 # ifdef i586
939         {"i586", "1"},
940 # endif
941 # ifdef i686
942         { "i686", "1"},
943 # endif
944 # ifdef k6
945         {"k6", "1"},
946 # endif
947 # ifdef sparc
948         {"sparc", "1"},
949 # endif
950 # ifdef __sparc__
951         {"__sparc__", "1"},
952 # endif
953 #if defined(__ppc__)
954         {"__ppc__", "1"},
955 #endif
956 #if defined(__ppc64__)
957         {"__ppc64__", "1"},
958 #endif
959 # ifdef __powerpc__
960         {"__powerpc__", "1"},
961 # endif
962 # ifdef __powerpc64__
963         {"__powerpc64__", "1"},
964 # endif
965 #if defined(__BIG_ENDIAN__)
966       {"__BIG_ENDIAN__", "1"},
967 #endif
968 #if defined(__LITTLE_ENDIAN__)
969       {"__LITTLE_ENDIAN__", "1"},
970 #endif
971 #if defined(__vxworks)
972       {"vxworks", "1"},
973 #endif
974         /* add any additional symbols before this line */
975         {NULL, NULL}
976 };
977
978 #endif /* MAKEDEPEND */
979 #endif /* CCIMAKE */