1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 /* $XConsortium: imakemdep.h,v 1.83 95/04/07 19:47:46 kaleb Exp $ */
4 /* $XFree86: xc/config/imake/imakemdep.h,v 3.12 1995/07/08 10:22:17 dawes Exp $ */
7 Copyright (c) 1993, 1994 X Consortium
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 Except as contained in this notice, the name of the X Consortium shall not be
27 used in advertising or otherwise to promote the sale, use or other dealings
28 in this Software without prior written authorization from the X Consortium.
34 * This file contains machine-dependent constants for the imake utility.
35 * When porting imake, read each of the steps below and add in any necessary
36 * definitions. In general you should *not* edit ccimake.c or imake.c!
41 * Step 1: imake_ccflags
42 * Define any special flags that will be needed to get imake.c to compile.
43 * These will be passed to the compile along with the contents of the
44 * make variable BOOTSTRAPCFLAGS.
46 #if defined(macII) || defined(_AUX_SOURCE)
47 #define imake_ccflags "-DmacII -DSYSV"
51 #define imake_ccflags "-DSYSV"
54 #if defined(USL) || defined(Oki) || defined(NCR)
55 #define imake_ccflags "-Xc -DSVR4"
59 #if defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
60 #define imake_ccflags "-DSVR4"
62 #include <sys/param.h>
64 #define imake_ccflags "-Dbsd43 -DNOSTDHDRS"
67 #define imake_ccflags "-Dbsd43"
74 #define imake_ccflags "-DSYSV -DUSG"
77 #if defined(_IBMR2) || defined(aix)
78 #define imake_ccflags "-Daix -DSYSV"
82 # if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
83 # define imake_ccflags "-DBSD43"
85 # define imake_ccflags "-DSYSV"
90 #define imake_ccflags "-Dluna -Duniosb"
95 # define imake_ccflags "-Xc -DSVR4"
97 # define imake_ccflags "-DSYSV"
103 # define imake_ccflags "-Xc -DSVR4"
109 # define imake_ccflags "-DSYSV"
114 #define imake_ccflags "-fn -tm c1"
118 #define imake_ccflags "-DX_NOT_POSIX"
122 #define imake_ccflags "-nologo -batch -D__STDC__"
126 #define imake_ccflags "-DSVR4 -DANSICPP"
130 #define imake_ccflags "-DSYSV -DUSG -DNOSTDHDRS"
133 #if defined(SX) || defined(PC_UX)
134 #define imake_ccflags "-DSYSV"
138 #define imake_ccflags "-DUSG"
141 #if defined(nec_ews_svr4) || defined(_nec_ews_svr4) || defined(_nec_up) || defined(_nec_ft)
142 #define imake_ccflags "-DSVR4"
146 #define imake_ccflags "-DNOSTDHDRS"
149 /* this is for OS/2 under EMX. This won't work with DOS */
151 #define imake_ccflags "-DBSD43"
154 #else /* not CCIMAKE */
158 * If your OS doesn't have a dup2() system call to duplicate one file
159 * descriptor onto another, define such a mechanism here (if you don't
160 * already fall under the existing category(ies).
162 #if defined(SYSV) && !defined(_CRAY) && !defined(Mips)
163 #define dup2(fd1,fd2) ((fd1 == fd2) ? fd1 : (close(fd2), \
164 fcntl(fd1, F_DUPFD, fd2)))
169 * Step 3: FIXUP_CPP_WHITESPACE
170 * If your cpp collapses tabs macro expansions into a single space and
171 * replaces escaped newlines with a space, define this symbol. This will
172 * cause imake to attempt to patch up the generated Makefile by looking
173 * for lines that have colons in them (this is why the rules file escapes
174 * all colons). One way to tell if you need this is to see whether or not
175 * your Makefiles have no tabs in them and lots of @@ strings.
177 #if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || (defined(AMOEBA) && defined(CROSS_COMPILE))
178 #define FIXUP_CPP_WHITESPACE
181 #define REMOVE_CPP_LEADSPACE
182 #define INLINE_SYNTAX
183 #define MAGIC_MAKE_VARS
186 #define FIXUP_CPP_WHITESPACE
190 * Step 4: USE_CC_E, DEFAULT_CC, DEFAULT_CPP
191 * If you want to use cc -E instead of cpp, define USE_CC_E.
192 * If use cc -E but want a different compiler, define DEFAULT_CC.
193 * If the cpp you need is not in /lib/cpp, define DEFAULT_CPP.
197 #define DEFAULT_CC "cl"
200 #define DEFAULT_CPP "/usr/lib/cpp"
202 #if defined(_IBMR2) && !defined(DEFAULT_CPP)
203 #define DEFAULT_CPP "/usr/lpp/X11/Xamples/util/cpp/cpp"
205 #if defined(sun) && defined(SVR4)
206 #define DEFAULT_CPP "/usr/ccs/lib/cpp"
209 #define DEFAULT_CPP "/usr/bin/cpp"
212 #define DEFAULT_CPP "/usr/ccs/lib/cpp"
215 #define DEFAULT_CPP "/usr/lib/cpp"
218 #define DEFAULT_CPP "/lib/pcpp"
220 #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
221 #define DEFAULT_CPP "/usr/libexec/cpp"
227 #define DEFAULT_CPP "/usr/lib/cpp"
230 /* expects cpp in PATH */
231 #define DEFAULT_CPP "cpp"
236 * The following table contains the flags that should be passed
237 * whenever a Makefile is being generated. If your preprocessor
238 * doesn't predefine any unique symbols, choose one and add it to the
239 * end of this table. Then, do the following:
241 * a. Use this symbol in Imake.tmpl when setting MacroFile.
242 * b. Put this symbol in the definition of BootstrapCFlags in your
243 * <platform>.cf file.
244 * c. When doing a make World, always add "BOOTSTRAPCFLAGS=-Dsymbol"
245 * to the end of the command line.
247 * Note that you may define more than one symbol (useful for platforms
248 * that support multiple operating systems).
251 #define ARGUMENTS 50 /* number of arguments in various arrays */
252 char *cpp_argv
[ARGUMENTS
] = {
253 "cc", /* replaced by the actual program to exec */
254 "-I.", /* add current directory to include path */
256 "-Uunix", /* remove unix symbol so that filename unix.c okay */
258 #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
259 defined(MACH) || defined(DRAGONFLY)
260 /* FIXME: strange list of obsolete systems */
269 "-DM4330", /* Tektronix */
272 "-DM4310", /* Tektronix */
274 #if defined(macII) || defined(_AUX_SOURCE)
275 "-DmacII", /* Apple A/UX */
282 #if !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV) && NEWSOS < 42
287 "-D_IBMR2", /* IBM RS-6000 (we ensured that aix is defined above */
289 #define aix /* allow BOOTSTRAPCFLAGS="-D_IBMR2" */
293 "-Daix", /* AIX instead of AOS */
295 #define ibm /* allow BOOTSTRAPCFLAGS="-Daix" */
299 "-Dibm", /* IBM PS/2 and RT under both AOS and AIX */
302 "-Dluna", /* OMRON luna 68K and 88K */
306 #ifdef luna88k /* need not on UniOS-Mach Vers. 1.13 */
307 "-traditional", /* for some older version */
308 #endif /* instead of "-DXCOMM=\\#" */
316 #ifdef _CRAY /* Cray */
320 "-DMips", /* Define and use Mips for Mips Co. OS/mach. */
321 # if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
322 "-DBSD43", /* Mips RISCOS supports two environments */
324 "-DSYSV", /* System V environment is the default */
328 "-DMOTOROLA", /* Motorola Delta Systems */
335 #endif /* MOTOROLA */
346 "-DISC40", /* ISC 4.0 */
349 "-DISC202", /* ISC 2.0.2 */
352 "-DISC30", /* ISC 3.0 */
354 "-DISC22", /* ISC 2.2.1 */
376 #ifdef SYSV386 /* System V/386 folks, obsolete */
384 "-DISC40", /* ISC 4.0 */
387 "-DISC202", /* ISC 2.0.2 */
390 "-DISC30", /* ISC 3.0 */
392 "-DISC22", /* ISC 2.2.1 */
460 # ifdef CROSS_COMPILE
468 # ifdef CROSS_mc68000
493 #else /* else MAKEDEPEND */
496 * If your compiler and/or preprocessor define any specific symbols, add
497 * them to the following table. The definition of struct symtab is
498 * in util/makedepend/def.h.
501 /* FIXME: strange list of obsolete systems */
502 struct pair predefs
[] = {
504 {"apollo", "1", NULL
},
507 {"ibm032", "1", NULL
},
528 {"sparc", "1", NULL
},
531 {"__sparc__", "1", NULL
},
546 {"_CRAY", "1", NULL
},
555 {"__mips__", "1", NULL
},
558 {"stellar", "1", NULL
},
561 {"mc68000", "1", NULL
},
564 {"mc68020", "1", NULL
},
567 {"__GNUC__", "1", NULL
},
570 {"__STDC__", "1", NULL
},
573 {"__HIGHC__", "1", NULL
},
581 {"luna1", "1", NULL
},
584 {"luna2", "1", NULL
},
587 {"luna88k", "1", NULL
},
590 {"uniosb", "1", NULL
},
593 {"uniosu", "1", NULL
},
597 {"ieeep754", "1", NULL
},
600 {"is68k", "1", NULL
},
609 {"__m88k__", "1", NULL
},
612 {"bsd43", "1", NULL
},
620 {"SYSTYPE_SYSV", "1", NULL
},
623 {"_SYSTYPE_SYSV", "1", NULL
},
627 {"__OSF__", "1", NULL
},
630 {"__osf__", "1", NULL
},
633 {"__alpha", "1", NULL
},
636 {"__DECC", "1", NULL
},
639 {"__decc", "1", NULL
},
642 {"__uxp__", "1", NULL
},
645 {"__sxg__", "1", NULL
},
648 {"__bsdi__", "1", NULL
},
651 {"nec_ews_svr2", "1", NULL
},
654 {"nec_ews_svr4", "1", NULL
},
657 {"_nec_ews_svr4", "1", NULL
},
660 {"_nec_up", "1", NULL
},
669 {"_nec_ft", "1", NULL
},
672 {"PC_UX", "1", NULL
},
678 {"__sgi", "1", NULL
},
681 {"__FreeBSD__", "1", NULL
},
684 {"__NetBSD__", "1", NULL
},
687 {"__OpenBSD__", "1", NULL
},
690 {"__DragonFly__", "1", NULL
},
693 {"__EMX__", "1", NULL
},
695 /* add any additional symbols before this line */
699 #endif /* MAKEDEPEND */
702 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */