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