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 $ */
5 Copyright (c) 1993, 1994 X Consortium
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:
14 The above copyright notice and this permission notice shall be included in
15 all copies or substantial portions of the Software.
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.
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.
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!
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.
46 #define imake_ccflags "-DSYSV"
48 #define imake_ccflags "-Wc,-Nd4000,-Ns3000 -DSYSV"
52 #if defined(macII) || defined(_AUX_SOURCE)
53 #define imake_ccflags "-DmacII -DSYSV"
57 #define imake_ccflags "-DSYSV"
60 #if defined(USL) || defined(Oki) || defined(NCR)
61 #define imake_ccflags "-Xc -DSVR4"
65 #if defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
66 #define imake_ccflags "-DSVR4"
68 #include <sys/param.h>
70 #define imake_ccflags "-Dbsd43 -DNOSTDHDRS"
73 #define imake_ccflags "-Dbsd43"
80 #define imake_ccflags "-DSYSV -DUSG"
83 #if defined(_IBMR2) || defined(aix)
84 #define imake_ccflags "-Daix -DSYSV"
88 # if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
89 # define imake_ccflags "-DBSD43"
91 # define imake_ccflags "-DSYSV"
96 #define imake_ccflags "-Dluna -Duniosb"
101 # define imake_ccflags "-Xc -DSVR4"
103 # define imake_ccflags "-DSYSV"
109 # define imake_ccflags "-Xc -DSVR4"
115 # define imake_ccflags "-DSYSV"
120 #define imake_ccflags "-fn -tm c1"
124 #define imake_ccflags "-DX_NOT_POSIX"
128 #define imake_ccflags "-nologo -batch -D__STDC__"
132 #define imake_ccflags "-DSVR4 -DANSICPP"
136 #define imake_ccflags "-DSYSV -DUSG -DNOSTDHDRS"
140 #define imake_ccflags "-DX_NOT_STDC_ENV -DX_NOT_POSIX"
144 #define imake_ccflags "-DSYSV -DUSG"
147 #if defined(SX) || defined(PC_UX)
148 #define imake_ccflags "-DSYSV"
152 #define imake_ccflags "-DUSG"
155 #if defined(nec_ews_svr4) || defined(_nec_ews_svr4) || defined(_nec_up) || defined(_nec_ft)
156 #define imake_ccflags "-DSVR4"
160 #define imake_ccflags "-DNOSTDHDRS"
163 /* this is for OS/2 under EMX. This won't work with DOS */
165 #define imake_ccflags "-DBSD43"
168 #else /* not CCIMAKE */
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).
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)))
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.
191 #if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || (defined(AMOEBA) && defined(CROSS_COMPILE))
192 #define FIXUP_CPP_WHITESPACE
195 #define REMOVE_CPP_LEADSPACE
196 #define INLINE_SYNTAX
197 #define MAGIC_MAKE_VARS
200 #define FIXUP_CPP_WHITESPACE
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.
214 #define DEFAULT_CC "cl"
217 #define DEFAULT_CPP "/usr/lib/cpp"
219 #if defined(_IBMR2) && !defined(DEFAULT_CPP)
220 #define DEFAULT_CPP "/usr/lpp/X11/Xamples/util/cpp/cpp"
222 #if defined(sun) && defined(SVR4)
223 #define DEFAULT_CPP "/usr/ccs/lib/cpp"
226 #define DEFAULT_CPP "/usr/bin/cpp"
229 #define DEFAULT_CPP "/usr/ccs/lib/cpp"
232 #define DEFAULT_CPP "/usr/lib/cpp"
235 #define DEFAULT_CPP "/lib/pcpp"
237 #if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
238 #define DEFAULT_CPP "/usr/libexec/cpp"
244 #define DEFAULT_CPP "/usr/lib/cpp"
247 /* expects cpp in PATH */
248 #define DEFAULT_CPP "cpp"
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:
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.
264 * Note that you may define more than one symbol (useful for platforms
265 * that support multiple operating systems).
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 */
273 "-Uunix", /* remove unix symbol so that filename unix.c okay */
275 #if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(MACH)
284 "-DM4330", /* Tektronix */
287 "-DM4310", /* Tektronix */
289 #if defined(macII) || defined(_AUX_SOURCE)
290 "-DmacII", /* Apple A/UX */
297 #if !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV) && NEWSOS < 42
302 "-D_IBMR2", /* IBM RS-6000 (we ensured that aix is defined above */
304 #define aix /* allow BOOTSTRAPCFLAGS="-D_IBMR2" */
308 "-Daix", /* AIX instead of AOS */
310 #define ibm /* allow BOOTSTRAPCFLAGS="-Daix" */
314 "-Dibm", /* IBM PS/2 and RT under both AOS and AIX */
317 "-Dluna", /* OMRON luna 68K and 88K */
321 #ifdef luna88k /* need not on UniOS-Mach Vers. 1.13 */
322 "-traditional", /* for some older version */
323 #endif /* instead of "-DXCOMM=\\#" */
331 #ifdef _CRAY /* Cray */
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 */
339 "-DSYSV", /* System V environment is the default */
343 "-DMOTOROLA", /* Motorola Delta Systems */
350 #endif /* MOTOROLA */
362 "-DISC40", /* ISC 4.0 */
365 "-DISC202", /* ISC 2.0.2 */
368 "-DISC30", /* ISC 3.0 */
370 "-DISC22", /* ISC 2.2.1 */
395 #ifdef SYSV386 /* System V/386 folks, obsolete */
403 "-DISC40", /* ISC 4.0 */
406 "-DISC202", /* ISC 2.0.2 */
409 "-DISC30", /* ISC 3.0 */
411 "-DISC22", /* ISC 2.2.1 */
479 # ifdef CROSS_COMPILE
487 # ifdef CROSS_mc68000
512 #else /* else MAKEDEPEND */
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.
519 struct symtab predefs[] = {
557 {"__hp9000s800", "1"},
560 {"__hp9000s700", "1"},
599 {(char *)"__GNUC__", (char *)"1"},
602 {(char *)"__STDC__", (char *)"1"},
652 {"SYSTYPE_SYSV", "1"},
655 {"_SYSTYPE_SYSV", "1"},
687 {"nec_ews_svr2", "1"},
690 {"nec_ews_svr4", "1"},
693 {"_nec_ews_svr4", "1"},
708 {(char *)"PC_UX", (char *)"1"},
713 /* add any additional symbols before this line */
717 #endif /* MAKEDEPEND */