160550Selan /*
260550Selan  * $XConsortium: imakemdep.h,v 1.38 91/08/25 11:36:39 rws Exp $
360550Selan  *
460550Selan  * This file contains machine-dependent constants for the imake utility.
560550Selan  * When porting imake, read each of the steps below and add in any necessary
660550Selan  * definitions.  Do *not* edit ccimake.c or imake.c!
760550Selan  */
860550Selan 
960550Selan #ifdef CCIMAKE
1060550Selan /*
1160550Selan  * Step 1:  imake_ccflags
1260550Selan  *     Define any special flags that will be needed to get imake.c to compile.
1360550Selan  *     These will be passed to the compile along with the contents of the
1460550Selan  *     make variable BOOTSTRAPCFLAGS.
1560550Selan  */
1660550Selan #ifdef hpux
1760550Selan #ifdef hp9000s800
1860550Selan #define imake_ccflags "-DSYSV"
1960550Selan #else
2060550Selan #define imake_ccflags "-Wc,-Nd4000,-Ns3000 -DSYSV"
2160550Selan #endif
2260550Selan #endif
2360550Selan 
2460550Selan #if defined(macII) || defined(_AUX_SOURCE)
2560550Selan #define imake_ccflags "-DmacII -DSYSV"
2660550Selan #endif
2760550Selan 
2860550Selan #ifdef stellar
2960550Selan #define imake_ccflags "-DSYSV"
3060550Selan #endif
3160550Selan 
3260550Selan #ifdef att
3360550Selan #define imake_ccflags "-Xc -DSVR4"
3460550Selan #endif
3560550Selan 
3660550Selan #ifdef sony
3760550Selan #ifdef SYSTYPE_SYSV
3860550Selan #define imake_ccflags "-DSVR4"
3960550Selan #else
4060550Selan #include <sys/param.h>
4160550Selan #if NEWSOS < 41
4260550Selan #define imake_ccflags "-Dbsd43 -DNOSTDHDRS"
4360550Selan #else
4460550Selan #define imake_ccflags "-Dbsd43"
4560550Selan #endif
4660550Selan #endif
4760550Selan #endif
4860550Selan 
4960550Selan #ifdef CRAY
5060550Selan /* -DX_NOT_STDC_ENV is just so we can bootstrap with cc instead of scc */
5160550Selan #define imake_ccflags "-DSYSV -DUSG -DX_NOT_STDC_ENV"
5260550Selan #endif
5360550Selan 
5460550Selan #ifdef _IBMR2
5560550Selan #define imake_ccflags "-Daix -DSYSV -D_IBMR2"
5660550Selan #else
5760550Selan #ifdef aix
5860550Selan #define imake_ccflags "-Daix -DSYSV"
5960550Selan #endif
6060550Selan #endif
6160550Selan 
6260550Selan #ifdef Mips
6360550Selan #  if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
6460550Selan #    define imake_ccflags "-DMips -DBSD43"
6560550Selan #  else
6660550Selan #    define imake_ccflags "-DMips -DSYSV"
6760550Selan #  endif
6860550Selan #endif
6960550Selan 
7060550Selan #ifdef is68k
7160550Selan #define imake_ccflags "-Dluna -Duniosb"
7260550Selan #endif
7360550Selan 
7460550Selan #ifdef SYSV386
7560550Selan # ifdef SVR4
7660550Selan #  define imake_ccflags "-Xc -DSVR4"
7760550Selan # else
7860550Selan #  define imake_ccflags "-DSYSV"
7960550Selan # endif
8060550Selan #endif
8160550Selan 
8260550Selan #ifdef __convex__
8360550Selan #define imake_ccflags "-fn -tm c1"
8460550Selan #endif
8560550Selan 
8660550Selan #ifdef apollo
8760550Selan #define imake_ccflags "-DX_NOT_POSIX"
8860550Selan #endif
8960550Selan 
9060550Selan #else /* not CCIMAKE */
9160550Selan #ifndef MAKEDEPEND
9260550Selan /*
9360550Selan  * Step 2:  dup2
9460550Selan  *     If your OS doesn't have a dup2() system call to duplicate one file
9560550Selan  *     descriptor onto another, define such a mechanism here (if you don't
9660550Selan  *     already fall under the existing category(ies).
9760550Selan  */
9860550Selan #if defined(SYSV) && !defined(CRAY) && !defined(Mips)
9960550Selan #define	dup2(fd1,fd2)	((fd1 == fd2) ? fd1 : (close(fd2), \
10060550Selan 					       fcntl(fd1, F_DUPFD, fd2)))
10160550Selan #endif
10260550Selan 
10360550Selan 
10460550Selan /*
10560550Selan  * Step 3:  FIXUP_CPP_WHITESPACE
10660550Selan  *     If your cpp collapses tabs macro expansions into a single space and
10760550Selan  *     replaces escaped newlines with a space, define this symbol.  This will
10860550Selan  *     cause imake to attempt to patch up the generated Makefile by looking
10960550Selan  *     for lines that have colons in them (this is why the rules file escapes
11060550Selan  *     all colons).  One way to tell if you need this is to see whether or not
11160550Selan  *     your Makefiles have no tabs in them and lots of @@ strings.
11260550Selan  */
11360550Selan #if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx)
11460550Selan #define FIXUP_CPP_WHITESPACE
11560550Selan #endif
11660550Selan 
11760550Selan 
11860550Selan /*
11960550Selan  * Step 4:  DEFAULT_CPP
12060550Selan  *     If the C preprocessor does not live in /lib/cpp, set this symbol to
12160550Selan  *     the appropriate location.
12260550Selan  */
12360550Selan #ifdef apollo
12460550Selan #define DEFAULT_CPP "/usr/lib/cpp"
12560550Selan #endif
12660550Selan #if defined(_IBMR2) && !defined(DEFAULT_CPP)
12760550Selan #define DEFAULT_CPP "/usr/lpp/X11/Xamples/util/cpp/cpp"
12860550Selan #endif
12960550Selan #if defined(hp9000) && !defined(DEFAULT_CPP)
130*64054Selan #define DEFAULT_CPP "/usr/libexec/gcc2/cpp"
13160550Selan #endif
13260550Selan 
13360550Selan /*
13460550Selan  * Step 5:  cpp_argv
13560550Selan  *     The following table contains the cpp flags that should be passed to
13660550Selan  *     cpp whenever a Makefile is being generated.  If your preprocessor
13760550Selan  *     doesn't predefine any unique symbols, choose one and add it to the
13860550Selan  *     end of this table.  Then, do the following:
13960550Selan  *
14060550Selan  *         a.  Use this symbol at the top of Imake.tmpl when setting MacroFile.
14160550Selan  *         b.  Put this symbol in the definition of BootstrapCFlags in your
14260550Selan  *             <platform>.cf file.
14360550Selan  *         c.  When doing a make World, always add "BOOTSTRAPCFLAGS=-Dsymbol"
14460550Selan  *             to the end of the command line.
14560550Selan  *
14660550Selan  *     Note that you may define more than one symbols (useful for platforms
14760550Selan  *     that support multiple operating systems).
14860550Selan  */
14960550Selan 
15060550Selan #define	ARGUMENTS 50	/* number of arguments in various arrays */
15160550Selan char *cpp_argv[ARGUMENTS] = {
15260550Selan #ifdef USE_CC_E
15360550Selan 	"cc",		/* replaced by the actual cpp program to exec */
15460550Selan 	"-E",
15560550Selan #else
15660550Selan 	"cpp",		/* replaced by the actual cpp program to exec */
15760550Selan #endif /* USE_CC_E */
15860550Selan 	"-I.",		/* add current directory to include path */
15960550Selan #ifdef unix
16060550Selan 	"-Uunix",	/* remove unix symbol so that filename unix.c okay */
16160550Selan #endif
16260550Selan #ifdef hp9000
16360550Selan 	"-traditional",
16460550Selan #endif
16560550Selan #ifdef M4330
16660550Selan 	"-DM4330",	/* Tektronix */
16760550Selan #endif
16860550Selan #ifdef M4310
16960550Selan 	"-DM4310",	/* Tektronix */
17060550Selan #endif
17160550Selan #if defined(macII) || defined(_AUX_SOURCE)
17260550Selan 	"-DmacII",	/* Apple A/UX */
17360550Selan #endif
17460550Selan #ifdef att
17560550Selan 	"-Datt",	/* AT&T products */
17660550Selan #endif
17760550Selan #ifdef sony
17860550Selan 	"-Dsony",	/* Sony */
17960550Selan #ifndef SYSTYPE_SYSV
18060550Selan 	"-Dbsd43",
18160550Selan #endif
18260550Selan #endif
18360550Selan #ifdef _IBMR2
18460550Selan 	"-D_IBMR2",	/* IBM RS-6000 (we ensured that aix is defined above */
18560550Selan #ifndef aix
18660550Selan #define aix		/* allow BOOTSTRAPCFLAGS="-D_IBMR2" */
18760550Selan #endif
18860550Selan #endif /* _IBMR2 */
18960550Selan #ifdef aix
19060550Selan 	"-Daix",	/* AIX instead of AOS */
19160550Selan #ifndef ibm
19260550Selan #define ibm		/* allow BOOTSTRAPCFLAGS="-Daix" */
19360550Selan #endif
19460550Selan #endif /* aix */
19560550Selan #ifdef ibm
19660550Selan 	"-Dibm",	/* IBM PS/2 and RT under both AOS and AIX */
19760550Selan #endif
19860550Selan #ifdef luna
19960550Selan 	"-Dluna",	/* OMRON luna 68K and 88K */
20060550Selan #ifdef luna1
20160550Selan 	"-Dluna1",
20260550Selan #endif
20360550Selan #ifdef luna88k		/* need not on UniOS-Mach Vers. 1.13 */
20460550Selan 	"-traditional", /* for some older version            */
20560550Selan #endif			/* instead of "-DXCOMM=\\#"          */
20660550Selan #ifdef uniosb
20760550Selan 	"-Duniosb",
20860550Selan #endif
20960550Selan #ifdef uniosu
21060550Selan 	"-Duniosu",
21160550Selan #endif
21260550Selan #endif /* luna */
21360550Selan #ifdef CRAY		/* Cray */
21460550Selan 	"-Ucray",
21560550Selan #endif
21660550Selan #ifdef Mips
21760550Selan 	"-DMips",	/* Define and use Mips for Mips Co. OS/mach. */
21860550Selan # if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
21960550Selan 	"-DBSD43",	/* Mips RISCOS supports two environments */
22060550Selan # else
22160550Selan 	"-DSYSV",	/* System V environment is the default */
22260550Selan # endif
22360550Selan #endif /* Mips */
22460550Selan #ifdef MOTOROLA
22560550Selan 	"-DMOTOROLA",    /* Motorola Delta Systems */
22660550Selan # ifdef SYSV
22760550Selan 	"-DSYSV",
22860550Selan # endif
22960550Selan # ifdef SVR4
23060550Selan 	"-DSVR4",
23160550Selan # endif
23260550Selan #endif /* MOTOROLA */
23360550Selan #ifdef SYSV386           /* System V/386 folks */
23460550Selan 	"-DSYSV386",
23560550Selan # ifdef SVR4
23660550Selan 	"-DSVR4",
23760550Selan # endif
23860550Selan # ifdef ISC
23960550Selan 	"-DISC",         /* ISC 2.2.1 */
24060550Selan # endif
24160550Selan # ifdef SCO
24260550Selan 	"-DSCO",
24360550Selan # endif
24460550Selan # ifdef ESIX
24560550Selan 	"-DESIX",
24660550Selan # endif
24760550Selan # ifdef ATT
24860550Selan 	"-DATT",
24960550Selan # endif
25060550Selan # ifdef DELL
25160550Selan 	"-DDELL",
25260550Selan #endif
25360550Selan #endif
25460550Selan };
25560550Selan #else /* else MAKEDEPEND */
25660550Selan /*
25760550Selan  * Step 6:  predefs
25860550Selan  *     If your compiler and/or preprocessor define any specific symbols, add
25960550Selan  *     them to the the following table.  The definition of struct symtab is
26060550Selan  *     in util/makedepend/def.h.
26160550Selan  */
26260550Selan struct symtab	predefs[] = {
26360550Selan #ifdef apollo
26460550Selan 	{"apollo", "1"},
26560550Selan #endif
26660550Selan #ifdef ibm032
26760550Selan 	{"ibm032", "1"},
26860550Selan #endif
26960550Selan #ifdef ibm
27060550Selan 	{"ibm", "1"},
27160550Selan #endif
27260550Selan #ifdef aix
27360550Selan 	{"aix", "1"},
27460550Selan #endif
27560550Selan #ifdef sun
27660550Selan 	{"sun", "1"},
27760550Selan #endif
27860550Selan #ifdef hpux
27960550Selan 	{"hpux", "1"},
28060550Selan #endif
28160550Selan #ifdef hp9000
28260550Selan 	{"hp9000", "1"},
28360550Selan #endif
28460550Selan #ifdef vax
28560550Selan 	{"vax", "1"},
28660550Selan #endif
28760550Selan #ifdef VMS
28860550Selan 	{"VMS", "1"},
28960550Selan #endif
29060550Selan #ifdef cray
29160550Selan 	{"cray", "1"},
29260550Selan #endif
29360550Selan #ifdef CRAY
29460550Selan 	{"CRAY", "1"},
29560550Selan #endif
29660550Selan #ifdef att
29760550Selan 	{"att", "1"},
29860550Selan #endif
29960550Selan #ifdef mips
30060550Selan 	{"mips", "1"},
30160550Selan #endif
30260550Selan #ifdef ultrix
30360550Selan 	{"ultrix", "1"},
30460550Selan #endif
30560550Selan #ifdef stellar
30660550Selan 	{"stellar", "1"},
30760550Selan #endif
30860550Selan #ifdef mc68000
30960550Selan 	{"mc68000", "1"},
31060550Selan #endif
31160550Selan #ifdef mc68020
31260550Selan 	{"mc68020", "1"},
31360550Selan #endif
31460550Selan #ifdef __GNUC__
31560550Selan 	{"__GNUC__", "1"},
31660550Selan #endif
31760550Selan #if __STDC__
31860550Selan 	{"__STDC__", "1"},
31960550Selan #endif
32060550Selan #ifdef __HIGHC__
32160550Selan 	{"__HIGHC__", "1"},
32260550Selan #endif
32360550Selan #ifdef CMU
32460550Selan 	{"CMU", "1"},
32560550Selan #endif
32660550Selan #ifdef luna
32760550Selan 	{"luna", "1"},
32860550Selan #ifdef luna1
32960550Selan 	{"luna1", "1"},
33060550Selan #endif
33160550Selan #ifdef luna2
33260550Selan 	{"luna2", "1"},
33360550Selan #endif
33460550Selan #ifdef luna88k
33560550Selan 	{"luna88k", "1"},
33660550Selan #endif
33760550Selan #ifdef uniosb
33860550Selan 	{"uniosb", "1"},
33960550Selan #endif
34060550Selan #ifdef uniosu
34160550Selan 	{"uniosu", "1"},
34260550Selan #endif
34360550Selan #endif
34460550Selan #ifdef ieeep754
34560550Selan 	{"ieeep754", "1"},
34660550Selan #endif
34760550Selan #ifdef is68k
34860550Selan 	{"is68k", "1"},
34960550Selan #endif
35060550Selan #ifdef m68k
35160550Selan         {"m68k", "1"},
35260550Selan #endif
35360550Selan #ifdef m88k
35460550Selan         {"m88k", "1"},
35560550Selan #endif
35660550Selan #ifdef bsd43
35760550Selan 	{"bsd43", "1"},
35860550Selan #endif
35960550Selan #ifdef hcx
36060550Selan 	{"hcx", 1},
36160550Selan #endif
36260550Selan 	/* add any additional symbols before this line */
36360550Selan 	{NULL, NULL}
36460550Selan };
36560550Selan 
36660550Selan #endif /* MAKEDEPEND */
36760550Selan #endif /* CCIMAKE */
368