]> andersk Git - moira.git/blob - util/imake/imakemdep.h
b936b3d9e0f8888141780e4fe79e8ce5a39d06b6
[moira.git] / util / imake / imakemdep.h
1 /*
2  * $XConsortium: imakemdep.h,v 1.10 89/12/18 16:56:38 jim Exp $
3  * 
4  * This file contains machine-dependent constants for the imake utility.  When
5  * porting imake, read each of the steps below and add in any necessary
6  * definitions.  Do *not* edit ccimake.c or imake.c!
7  */
8
9 #ifdef CCIMAKE
10 /*
11  * Step 1:  imake_ccflags
12  *     Define any special flags that will be needed to get imake.c to compile.
13  *     These will be passed to the compile along with the contents of the
14  *     make variable BOOTSTRAPCFLAGS.
15  */
16 #ifdef hpux
17 #define imake_ccflags "-Wc,-Nd4000,-Ns3000 -DSYSV"
18 #endif
19
20 #ifdef macII
21 #define imake_ccflags "-DSYSV"
22 #endif
23
24 #ifdef stellar
25 #define imake_ccflags "-DSYSV"
26 #endif
27
28 #ifdef att
29 #define imake_ccflags "-DSYSV -DUSG"
30 #endif
31
32 #ifdef CRAY
33 #define imake_ccflags "-DSYSV -DUSG"
34 #endif
35
36 #ifdef aix
37 #define imake_ccflags "-Daix -DSYSV"
38 #endif
39
40 #ifdef umips
41 #ifdef SYSTYPE_SYSV
42 #define imake_ccflags "-DSYSV -I../../lib/X/mips -I/usr/include/bsd ../../lib/X/mips/mipssysvc.c -lbsd"
43 #endif
44 #endif
45
46 #ifdef ultrix
47 #include <dbm.h>
48 #ifdef BYTESIZ
49 #define imake_ccflags "-O -DULTRIX31"
50 #else
51 #define ULTRIX40
52 #define imake_ccflags "-O -DULTRIX40"
53 #endif
54 #endif
55
56 #else /* not CCIMAKE */
57 #ifndef MAKEDEPEND
58 /*
59  * Step 2:  dup2
60  *     If your OS doesn't have a dup2() system call to duplicate one file
61  *     descriptor onto another, define such a mechanism here (if you don't
62  *     already fall under the existing category(ies).
63  */
64 #if defined(SYSV) && !defined(CRAY)
65 #define dup2(fd1,fd2)   ((fd1 == fd2) ? fd1 : (close(fd2), \
66                                                fcntl(fd1, F_DUPFD, fd2)))
67 #endif
68
69
70 /*
71  * Step 3:  FIXUP_CPP_WHITESPACE
72  *     If your cpp collapses tabs macro expansions into a single space and
73  *     replaces escaped newlines with a space, define this symbol.  This will
74  *     cause imake to attempt to patch up the generated Makefile by looking
75  *     for lines that have colons in them (this is why the rules file escapes
76  *     all colons).  One way to tell if you need this is to see whether or not
77  *     your Makefiles have no tabs in them and lots of @@ strings.
78  */
79 #if defined(sun) || defined(SYSV) || defined(_AIX)
80 #define FIXUP_CPP_WHITESPACE
81 #endif
82
83
84 /*
85  * Step 4:  DEFAULT_CPP
86  *     If the C preprocessor does not live in /lib/cpp, set this symbol to 
87  *     the appropriate location.
88  */
89 #ifdef apollo
90 #define DEFAULT_CPP "/usr/lib/cpp"
91 #endif
92
93
94 /*
95  * Step 5:  cpp_argv
96  *     The following table contains the cpp flags that should be passed to 
97  *     cpp whenever a Makefile is being generated.  If your preprocessor 
98  *     doesn't predefine any unique symbols, choose one and add it to the
99  *     end of this table.  Then, do the following:
100  * 
101  *         a.  Use this symbol at the top of Imake.tmpl when setting MacroFile.
102  *         b.  Put this symbol in the definition of BootstrapCFlags in your
103  *             <platform>.cf file.
104  *         c.  When doing a make World, always add "BOOTSTRAPCFLAGS=-Dsymbol" 
105  *             to the end of the command line.
106  * 
107  *     Note that you may define more than one symbols (useful for platforms 
108  *     that support multiple operating systems).
109  */
110
111 #define ARGUMENTS 50    /* number of arguments in various arrays */
112 char *cpp_argv[ARGUMENTS] = {
113         "cpp",          /* replaced by the actual cpp program to exec */
114         "-I.",          /* add current directory to include path */
115 #ifdef unix
116         "-Uunix",       /* remove unix symbol so that filename unix.c okay */
117 #endif
118 #ifdef M4330
119         "-DM4330",      /* Tektronix */
120 #endif
121 #ifdef M4310
122         "-DM4310",      /* Tektronix */
123 #endif
124 #ifdef macII
125         "-DmacII",      /* Apple A/UX */
126 #endif
127 #ifdef att
128         "-Datt",        /* AT&T products */
129 #endif
130 #ifdef aix
131         "-Daix",        /* AIX instead of AOS */
132 #ifndef ibm
133 #define ibm             /* allow BOOTSTRAPCFLAGS="-Daix" */
134 #endif
135 #endif
136 #ifdef ibm
137         "-Dibm",        /* IBM PS/2 and RT under both AOS and AIX */
138 #endif
139 #ifdef ULTRIX31
140         "-DULTRIX31",
141 #endif
142 #ifdef ULTRIX40
143         "-DULTRIX40",
144 #endif
145 };
146 #else /* else MAKEDEPEND */
147 /*
148  * Step 6:  predefs
149  *     If your compiler and/or preprocessor define any specific symbols, add
150  *     them to the the following table.  The definition of struct symtab is
151  *     in util/makedepend/main.c.
152  */
153 struct symtab   predefs[] = {
154 #ifdef apollo
155         {"apollo", "1"},
156 #endif
157 #ifdef ibm032
158         {"ibm032", "1"},
159 #endif
160 #ifdef ibm
161         {"ibm", "1"},
162 #endif
163 #ifdef aix
164         {"aix", "1"},
165 #endif
166 #ifdef sun
167         {"sun", "1"},
168 #endif
169 #ifdef hpux
170         {"hpux", "1"},
171 #endif
172 #ifdef vax
173         {"vax", "1"},
174 #endif
175 #ifdef VMS
176         {"VMS", "1"},
177 #endif
178 #ifdef cray
179         {"cray", "1"},
180 #endif
181 #ifdef CRAY
182         {"CRAY", "1"},
183 #endif
184 #ifdef att
185         {"att", "1"},
186 #endif
187 #ifdef mips
188         {"mips", "1"},
189 #endif
190 #ifdef ultrix
191         {"ultrix", "1"},
192 #endif
193 #ifdef stellar
194         {"stellar", "1"},
195 #endif
196 #ifdef mc68000
197         {"mc68000", "1"},
198 #endif
199 #ifdef mc68020
200         {"mc68020", "1"},
201 #endif
202 #ifdef __GNUC__
203         {"__GNUC__", "1"},
204 #endif
205 #ifdef __STDC__
206         {"__STDC__", "1"},
207 #endif
208 #ifdef __HIGHC__
209         {"__HIGHC__", "1"},
210 #endif
211 #ifdef CMU
212         {"CMU", "1"},
213 #endif
214         /* add any additional symbols before this line */
215         {NULL, NULL}
216 };
217
218 #endif /* MAKEDEPEND */
219 #endif /* CCIMAKE */
This page took 0.042368 seconds and 3 git commands to generate.