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 $ */
6 Copyright (c) 1993, 1994 X Consortium
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:
15 The above copyright notice and this permission notice shall be included in
16 all copies or substantial portions of the Software.
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.
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.
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!
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.
47 #define imake_ccflags "-DSYSV"
49 #define imake_ccflags "-Wc,-Nd4000,-Ns3000 -DSYSV"
53 #if defined(macII) || defined(_AUX_SOURCE)
54 #define imake_ccflags "-DmacII -DSYSV"
58 #define imake_ccflags "-DSYSV"
61 #if defined(USL) || defined(Oki) || defined(NCR)
62 #define imake_ccflags "-Xc -DSVR4"
66 #if defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
67 #define imake_ccflags "-DSVR4"
69 #include <sys/param.h>
71 #define imake_ccflags "-Dbsd43 -DNOSTDHDRS"
74 #define imake_ccflags "-Dbsd43"
81 #define imake_ccflags "-DSYSV -DUSG"
84 #if defined(_IBMR2) || defined(aix)
85 #define imake_ccflags "-Daix -DSYSV"
89 # if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
90 # define imake_ccflags "-DBSD43"
92 # define imake_ccflags "-DSYSV"
97 #define imake_ccflags "-Dluna -Duniosb"
102 # define imake_ccflags "-Xc -DSVR4"
104 # define imake_ccflags "-DSYSV"
110 # define imake_ccflags "-Xc -DSVR4"
116 # define imake_ccflags "-DSYSV"
121 #define imake_ccflags "-fn -tm c1"
125 #define imake_ccflags "-DX_NOT_POSIX"
129 #define imake_ccflags "-nologo -batch -D__STDC__"
133 #define imake_ccflags "-DSVR4 -DANSICPP"
137 #define imake_ccflags "-DSYSV -DUSG -DNOSTDHDRS"
141 #define imake_ccflags "-DX_NOT_STDC_ENV -DX_NOT_POSIX"
145 #define imake_ccflags "-DSYSV -DUSG"
148 #if defined(SX) || defined(PC_UX)
149 #define imake_ccflags "-DSYSV"
153 #define imake_ccflags "-DUSG"
156 #if defined(nec_ews_svr4) || defined(_nec_ews_svr4) || defined(_nec_up) || defined(_nec_ft)
157 #define imake_ccflags "-DSVR4"
161 #define imake_ccflags "-DNOSTDHDRS"
164 /* this is for OS/2 under EMX. This won't work with DOS */
166 #define imake_ccflags "-DBSD43"
169 #else /* not CCIMAKE */
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).
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)))
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.
192 #if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || (defined(AMOEBA) && defined(CROSS_COMPILE))
193 #define FIXUP_CPP_WHITESPACE
196 #define REMOVE_CPP_LEADSPACE
197 #define INLINE_SYNTAX
198 #define MAGIC_MAKE_VARS
201 #define FIXUP_CPP_WHITESPACE
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.
215 #define DEFAULT_CC "cl"
218 #define DEFAULT_CPP "/usr/lib/cpp"
220 #if defined(_IBMR2) && !defined(DEFAULT_CPP)
221 #define DEFAULT_CPP "/usr/lpp/X11/Xamples/util/cpp/cpp"
223 #if defined(sun) && defined(SVR4)
224 #define DEFAULT_CPP "/usr/ccs/lib/cpp"
227 #define DEFAULT_CPP "/usr/bin/cpp"
230 #define DEFAULT_CPP "/usr/ccs/lib/cpp"
233 #define DEFAULT_CPP "/usr/lib/cpp"
236 #define DEFAULT_CPP "/lib/pcpp"
238 #if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
239 #define DEFAULT_CPP "/usr/libexec/cpp"
245 #define DEFAULT_CPP "/usr/lib/cpp"
248 /* expects cpp in PATH */
249 #define DEFAULT_CPP "cpp"
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:
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.
265 * Note that you may define more than one symbol (useful for platforms
266 * that support multiple operating systems).
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 */
274 "-Uunix", /* remove unix symbol so that filename unix.c okay */
276 #if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(MACH)
285 "-DM4330", /* Tektronix */
288 "-DM4310", /* Tektronix */
290 #if defined(macII) || defined(_AUX_SOURCE)
291 "-DmacII", /* Apple A/UX */
298 #if !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV) && NEWSOS < 42
303 "-D_IBMR2", /* IBM RS-6000 (we ensured that aix is defined above */
305 #define aix /* allow BOOTSTRAPCFLAGS="-D_IBMR2" */
309 "-Daix", /* AIX instead of AOS */
311 #define ibm /* allow BOOTSTRAPCFLAGS="-Daix" */
315 "-Dibm", /* IBM PS/2 and RT under both AOS and AIX */
318 "-Dluna", /* OMRON luna 68K and 88K */
322 #ifdef luna88k /* need not on UniOS-Mach Vers. 1.13 */
323 "-traditional", /* for some older version */
324 #endif /* instead of "-DXCOMM=\\#" */
332 #ifdef _CRAY /* Cray */
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 */
340 "-DSYSV", /* System V environment is the default */
344 "-DMOTOROLA", /* Motorola Delta Systems */
351 #endif /* MOTOROLA */
362 "-DISC40", /* ISC 4.0 */
365 "-DISC202", /* ISC 2.0.2 */
368 "-DISC30", /* ISC 3.0 */
370 "-DISC22", /* ISC 2.2.1 */
392 #ifdef SYSV386 /* System V/386 folks, obsolete */
400 "-DISC40", /* ISC 4.0 */
403 "-DISC202", /* ISC 2.0.2 */
406 "-DISC30", /* ISC 3.0 */
408 "-DISC22", /* ISC 2.2.1 */
476 # ifdef CROSS_COMPILE
484 # ifdef CROSS_mc68000
509 #else /* else MAKEDEPEND */
512 * If your compiler and/or preprocessor define any specific symbols, add
513 * them to the the following table. The definition of struct symtab is
514 * in util/makedepend/def.h.
516 struct pair predefs
[] = {
518 {"apollo", "1", NULL
},
521 {"ibm032", "1", NULL
},
542 {"sparc", "1", NULL
},
545 {"__sparc__", "1", NULL
},
551 {"__hpux", "1", NULL
},
554 {"__hp9000s800", "1", NULL
},
557 {"__hp9000s700", "1", NULL
},
572 {"_CRAY", "1", NULL
},
581 {"__mips__", "1", NULL
},
584 {"ultrix", "1", NULL
},
587 {"stellar", "1", NULL
},
590 {"mc68000", "1", NULL
},
593 {"mc68020", "1", NULL
},
596 {"__GNUC__", "1", NULL
},
599 {"__STDC__", "1", NULL
},
602 {"__HIGHC__", "1", NULL
},
610 {"luna1", "1", NULL
},
613 {"luna2", "1", NULL
},
616 {"luna88k", "1", NULL
},
619 {"uniosb", "1", NULL
},
622 {"uniosu", "1", NULL
},
626 {"ieeep754", "1", NULL
},
629 {"is68k", "1", NULL
},
638 {"__m88k__", "1", NULL
},
641 {"bsd43", "1", NULL
},
649 {"SYSTYPE_SYSV", "1", NULL
},
652 {"_SYSTYPE_SYSV", "1", NULL
},
656 {"__OSF__", "1", NULL
},
659 {"__osf__", "1", NULL
},
662 {"__alpha", "1", NULL
},
665 {"__DECC", "1", NULL
},
668 {"__decc", "1", NULL
},
671 {"__uxp__", "1", NULL
},
674 {"__sxg__", "1", NULL
},
677 {"_SEQUENT_", "1", NULL
},
678 {"__STDC__", "1", NULL
},
681 {"__bsdi__", "1", NULL
},
684 {"nec_ews_svr2", "1", NULL
},
687 {"nec_ews_svr4", "1", NULL
},
690 {"_nec_ews_svr4", "1", NULL
},
693 {"_nec_up", "1", NULL
},
702 {"_nec_ft", "1", NULL
},
705 {"PC_UX", "1", NULL
},
711 {"__sgi", "1", NULL
},
714 {"__FreeBSD__", "1", NULL
},
717 {"__NetBSD__", "1", NULL
},
720 {"__OpenBSD__", "1", NULL
},
723 {"__EMX__", "1", NULL
},
725 /* add any additional symbols before this line */
729 #endif /* MAKEDEPEND */