1 /* 2 * $XConsortium: imakemdep.h,v 1.38 91/08/25 11:36:39 rws Exp $ 3 * 4 * This file contains machine-dependent constants for the imake utility. 5 * When 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 #ifdef hp9000s800 18 #define imake_ccflags "-DSYSV" 19 #else 20 #define imake_ccflags "-Wc,-Nd4000,-Ns3000 -DSYSV" 21 #endif 22 #endif 23 24 #if defined(macII) || defined(_AUX_SOURCE) 25 #define imake_ccflags "-DmacII -DSYSV" 26 #endif 27 28 #ifdef stellar 29 #define imake_ccflags "-DSYSV" 30 #endif 31 32 #ifdef att 33 #define imake_ccflags "-Xc -DSVR4" 34 #endif 35 36 #ifdef sony 37 #ifdef SYSTYPE_SYSV 38 #define imake_ccflags "-DSVR4" 39 #else 40 #include <sys/param.h> 41 #if NEWSOS < 41 42 #define imake_ccflags "-Dbsd43 -DNOSTDHDRS" 43 #else 44 #define imake_ccflags "-Dbsd43" 45 #endif 46 #endif 47 #endif 48 49 #ifdef CRAY 50 /* -DX_NOT_STDC_ENV is just so we can bootstrap with cc instead of scc */ 51 #define imake_ccflags "-DSYSV -DUSG -DX_NOT_STDC_ENV" 52 #endif 53 54 #ifdef _IBMR2 55 #define imake_ccflags "-Daix -DSYSV -D_IBMR2" 56 #else 57 #ifdef aix 58 #define imake_ccflags "-Daix -DSYSV" 59 #endif 60 #endif 61 62 #ifdef Mips 63 # if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43) 64 # define imake_ccflags "-DMips -DBSD43" 65 # else 66 # define imake_ccflags "-DMips -DSYSV" 67 # endif 68 #endif 69 70 #ifdef is68k 71 #define imake_ccflags "-Dluna -Duniosb" 72 #endif 73 74 #ifdef SYSV386 75 # ifdef SVR4 76 # define imake_ccflags "-Xc -DSVR4" 77 # else 78 # define imake_ccflags "-DSYSV" 79 # endif 80 #endif 81 82 #ifdef __convex__ 83 #define imake_ccflags "-fn -tm c1" 84 #endif 85 86 #ifdef apollo 87 #define imake_ccflags "-DX_NOT_POSIX" 88 #endif 89 90 #else /* not CCIMAKE */ 91 #ifndef MAKEDEPEND 92 /* 93 * Step 2: dup2 94 * If your OS doesn't have a dup2() system call to duplicate one file 95 * descriptor onto another, define such a mechanism here (if you don't 96 * already fall under the existing category(ies). 97 */ 98 #if defined(SYSV) && !defined(CRAY) && !defined(Mips) 99 #define dup2(fd1,fd2) ((fd1 == fd2) ? fd1 : (close(fd2), \ 100 fcntl(fd1, F_DUPFD, fd2))) 101 #endif 102 103 104 /* 105 * Step 3: FIXUP_CPP_WHITESPACE 106 * If your cpp collapses tabs macro expansions into a single space and 107 * replaces escaped newlines with a space, define this symbol. This will 108 * cause imake to attempt to patch up the generated Makefile by looking 109 * for lines that have colons in them (this is why the rules file escapes 110 * all colons). One way to tell if you need this is to see whether or not 111 * your Makefiles have no tabs in them and lots of @@ strings. 112 */ 113 #if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) 114 #define FIXUP_CPP_WHITESPACE 115 #endif 116 117 118 /* 119 * Step 4: DEFAULT_CPP 120 * If the C preprocessor does not live in /lib/cpp, set this symbol to 121 * the appropriate location. 122 */ 123 #ifdef apollo 124 #define DEFAULT_CPP "/usr/lib/cpp" 125 #endif 126 #if defined(_IBMR2) && !defined(DEFAULT_CPP) 127 #define DEFAULT_CPP "/usr/lpp/X11/Xamples/util/cpp/cpp" 128 #endif 129 #if defined(hp9000) && !defined(DEFAULT_CPP) 130 #define DEFAULT_CPP "/usr/libexec/gcc2/cpp" 131 #endif 132 133 /* 134 * Step 5: cpp_argv 135 * The following table contains the cpp flags that should be passed to 136 * cpp whenever a Makefile is being generated. If your preprocessor 137 * doesn't predefine any unique symbols, choose one and add it to the 138 * end of this table. Then, do the following: 139 * 140 * a. Use this symbol at the top of Imake.tmpl when setting MacroFile. 141 * b. Put this symbol in the definition of BootstrapCFlags in your 142 * <platform>.cf file. 143 * c. When doing a make World, always add "BOOTSTRAPCFLAGS=-Dsymbol" 144 * to the end of the command line. 145 * 146 * Note that you may define more than one symbols (useful for platforms 147 * that support multiple operating systems). 148 */ 149 150 #define ARGUMENTS 50 /* number of arguments in various arrays */ 151 char *cpp_argv[ARGUMENTS] = { 152 #ifdef USE_CC_E 153 "cc", /* replaced by the actual cpp program to exec */ 154 "-E", 155 #else 156 "cpp", /* replaced by the actual cpp program to exec */ 157 #endif /* USE_CC_E */ 158 "-I.", /* add current directory to include path */ 159 #ifdef unix 160 "-Uunix", /* remove unix symbol so that filename unix.c okay */ 161 #endif 162 #ifdef hp9000 163 "-traditional", 164 #endif 165 #ifdef M4330 166 "-DM4330", /* Tektronix */ 167 #endif 168 #ifdef M4310 169 "-DM4310", /* Tektronix */ 170 #endif 171 #if defined(macII) || defined(_AUX_SOURCE) 172 "-DmacII", /* Apple A/UX */ 173 #endif 174 #ifdef att 175 "-Datt", /* AT&T products */ 176 #endif 177 #ifdef sony 178 "-Dsony", /* Sony */ 179 #ifndef SYSTYPE_SYSV 180 "-Dbsd43", 181 #endif 182 #endif 183 #ifdef _IBMR2 184 "-D_IBMR2", /* IBM RS-6000 (we ensured that aix is defined above */ 185 #ifndef aix 186 #define aix /* allow BOOTSTRAPCFLAGS="-D_IBMR2" */ 187 #endif 188 #endif /* _IBMR2 */ 189 #ifdef aix 190 "-Daix", /* AIX instead of AOS */ 191 #ifndef ibm 192 #define ibm /* allow BOOTSTRAPCFLAGS="-Daix" */ 193 #endif 194 #endif /* aix */ 195 #ifdef ibm 196 "-Dibm", /* IBM PS/2 and RT under both AOS and AIX */ 197 #endif 198 #ifdef luna 199 "-Dluna", /* OMRON luna 68K and 88K */ 200 #ifdef luna1 201 "-Dluna1", 202 #endif 203 #ifdef luna88k /* need not on UniOS-Mach Vers. 1.13 */ 204 "-traditional", /* for some older version */ 205 #endif /* instead of "-DXCOMM=\\#" */ 206 #ifdef uniosb 207 "-Duniosb", 208 #endif 209 #ifdef uniosu 210 "-Duniosu", 211 #endif 212 #endif /* luna */ 213 #ifdef CRAY /* Cray */ 214 "-Ucray", 215 #endif 216 #ifdef Mips 217 "-DMips", /* Define and use Mips for Mips Co. OS/mach. */ 218 # if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43) 219 "-DBSD43", /* Mips RISCOS supports two environments */ 220 # else 221 "-DSYSV", /* System V environment is the default */ 222 # endif 223 #endif /* Mips */ 224 #ifdef MOTOROLA 225 "-DMOTOROLA", /* Motorola Delta Systems */ 226 # ifdef SYSV 227 "-DSYSV", 228 # endif 229 # ifdef SVR4 230 "-DSVR4", 231 # endif 232 #endif /* MOTOROLA */ 233 #ifdef SYSV386 /* System V/386 folks */ 234 "-DSYSV386", 235 # ifdef SVR4 236 "-DSVR4", 237 # endif 238 # ifdef ISC 239 "-DISC", /* ISC 2.2.1 */ 240 # endif 241 # ifdef SCO 242 "-DSCO", 243 # endif 244 # ifdef ESIX 245 "-DESIX", 246 # endif 247 # ifdef ATT 248 "-DATT", 249 # endif 250 # ifdef DELL 251 "-DDELL", 252 #endif 253 #endif 254 }; 255 #else /* else MAKEDEPEND */ 256 /* 257 * Step 6: predefs 258 * If your compiler and/or preprocessor define any specific symbols, add 259 * them to the the following table. The definition of struct symtab is 260 * in util/makedepend/def.h. 261 */ 262 struct symtab predefs[] = { 263 #ifdef apollo 264 {"apollo", "1"}, 265 #endif 266 #ifdef ibm032 267 {"ibm032", "1"}, 268 #endif 269 #ifdef ibm 270 {"ibm", "1"}, 271 #endif 272 #ifdef aix 273 {"aix", "1"}, 274 #endif 275 #ifdef sun 276 {"sun", "1"}, 277 #endif 278 #ifdef hpux 279 {"hpux", "1"}, 280 #endif 281 #ifdef hp9000 282 {"hp9000", "1"}, 283 #endif 284 #ifdef vax 285 {"vax", "1"}, 286 #endif 287 #ifdef VMS 288 {"VMS", "1"}, 289 #endif 290 #ifdef cray 291 {"cray", "1"}, 292 #endif 293 #ifdef CRAY 294 {"CRAY", "1"}, 295 #endif 296 #ifdef att 297 {"att", "1"}, 298 #endif 299 #ifdef mips 300 {"mips", "1"}, 301 #endif 302 #ifdef ultrix 303 {"ultrix", "1"}, 304 #endif 305 #ifdef stellar 306 {"stellar", "1"}, 307 #endif 308 #ifdef mc68000 309 {"mc68000", "1"}, 310 #endif 311 #ifdef mc68020 312 {"mc68020", "1"}, 313 #endif 314 #ifdef __GNUC__ 315 {"__GNUC__", "1"}, 316 #endif 317 #if __STDC__ 318 {"__STDC__", "1"}, 319 #endif 320 #ifdef __HIGHC__ 321 {"__HIGHC__", "1"}, 322 #endif 323 #ifdef CMU 324 {"CMU", "1"}, 325 #endif 326 #ifdef luna 327 {"luna", "1"}, 328 #ifdef luna1 329 {"luna1", "1"}, 330 #endif 331 #ifdef luna2 332 {"luna2", "1"}, 333 #endif 334 #ifdef luna88k 335 {"luna88k", "1"}, 336 #endif 337 #ifdef uniosb 338 {"uniosb", "1"}, 339 #endif 340 #ifdef uniosu 341 {"uniosu", "1"}, 342 #endif 343 #endif 344 #ifdef ieeep754 345 {"ieeep754", "1"}, 346 #endif 347 #ifdef is68k 348 {"is68k", "1"}, 349 #endif 350 #ifdef m68k 351 {"m68k", "1"}, 352 #endif 353 #ifdef m88k 354 {"m88k", "1"}, 355 #endif 356 #ifdef bsd43 357 {"bsd43", "1"}, 358 #endif 359 #ifdef hcx 360 {"hcx", 1}, 361 #endif 362 /* add any additional symbols before this line */ 363 {NULL, NULL} 364 }; 365 366 #endif /* MAKEDEPEND */ 367 #endif /* CCIMAKE */ 368