00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifdef CCIMAKE
00038
00039
00040
00041
00042
00043
00044 #ifdef hpux
00045 #ifdef hp9000s800
00046 #define imake_ccflags "-DSYSV"
00047 #else
00048 #define imake_ccflags "-Wc,-Nd4000,-Ns3000 -DSYSV"
00049 #endif
00050 #endif
00051
00052 #if defined(macII) || defined(_AUX_SOURCE)
00053 #define imake_ccflags "-DmacII -DSYSV"
00054 #endif
00055
00056 #ifdef stellar
00057 #define imake_ccflags "-DSYSV"
00058 #endif
00059
00060 #if defined(USL) || defined(Oki) || defined(NCR)
00061 #define imake_ccflags "-Xc -DSVR4"
00062 #endif
00063
00064 #ifdef sony
00065 #if defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
00066 #define imake_ccflags "-DSVR4"
00067 #else
00068 #include <sys/param.h>
00069 #if NEWSOS < 41
00070 #define imake_ccflags "-Dbsd43 -DNOSTDHDRS"
00071 #else
00072 #if NEWSOS < 42
00073 #define imake_ccflags "-Dbsd43"
00074 #endif
00075 #endif
00076 #endif
00077 #endif
00078
00079 #ifdef _CRAY
00080 #define imake_ccflags "-DSYSV -DUSG"
00081 #endif
00082
00083 #if defined(_IBMR2) || defined(aix)
00084 #define imake_ccflags "-Daix -DSYSV"
00085 #endif
00086
00087 #ifdef Mips
00088 # if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
00089 # define imake_ccflags "-DBSD43"
00090 # else
00091 # define imake_ccflags "-DSYSV"
00092 # endif
00093 #endif
00094
00095 #ifdef is68k
00096 #define imake_ccflags "-Dluna -Duniosb"
00097 #endif
00098
00099 #ifdef SYSV386
00100 # ifdef SVR4
00101 # define imake_ccflags "-Xc -DSVR4"
00102 # else
00103 # define imake_ccflags "-DSYSV"
00104 # endif
00105 #endif
00106
00107 #ifdef SVR4
00108 # ifdef i386
00109 # define imake_ccflags "-Xc -DSVR4"
00110 # endif
00111 #endif
00112
00113 #ifdef SYSV
00114 # ifdef i386
00115 # define imake_ccflags "-DSYSV"
00116 # endif
00117 #endif
00118
00119 #ifdef __convex__
00120 #define imake_ccflags "-fn -tm c1"
00121 #endif
00122
00123 #ifdef apollo
00124 #define imake_ccflags "-DX_NOT_POSIX"
00125 #endif
00126
00127 #ifdef WIN32
00128 #define imake_ccflags "-nologo -batch -D__STDC__"
00129 #endif
00130
00131 #ifdef __uxp__
00132 #define imake_ccflags "-DSVR4 -DANSICPP"
00133 #endif
00134
00135 #ifdef __sxg__
00136 #define imake_ccflags "-DSYSV -DUSG -DNOSTDHDRS"
00137 #endif
00138
00139 #ifdef sequent
00140 #define imake_ccflags "-DX_NOT_STDC_ENV -DX_NOT_POSIX"
00141 #endif
00142
00143 #ifdef _SEQUENT_
00144 #define imake_ccflags "-DSYSV -DUSG"
00145 #endif
00146
00147 #if defined(SX) || defined(PC_UX)
00148 #define imake_ccflags "-DSYSV"
00149 #endif
00150
00151 #ifdef nec_ews_svr2
00152 #define imake_ccflags "-DUSG"
00153 #endif
00154
00155 #if defined(nec_ews_svr4) || defined(_nec_ews_svr4) || defined(_nec_up) || defined(_nec_ft)
00156 #define imake_ccflags "-DSVR4"
00157 #endif
00158
00159 #ifdef MACH
00160 #define imake_ccflags "-DNOSTDHDRS"
00161 #endif
00162
00163
00164 #if defined(__EMX__)
00165 #define imake_ccflags "-DBSD43"
00166 #endif
00167
00168 #else
00169 #ifndef MAKEDEPEND
00170
00171
00172
00173
00174
00175
00176 #if defined(SYSV) && !defined(_CRAY) && !defined(Mips) && !defined(_SEQUENT_)
00177 #define dup2(fd1,fd2) ((fd1 == fd2) ? fd1 : (close(fd2), \
00178 fcntl(fd1, F_DUPFD, fd2)))
00179 #endif
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191 #if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || (defined(AMOEBA) && defined(CROSS_COMPILE))
00192 #define FIXUP_CPP_WHITESPACE
00193 #endif
00194 #ifdef WIN32
00195 #define REMOVE_CPP_LEADSPACE
00196 #define INLINE_SYNTAX
00197 #define MAGIC_MAKE_VARS
00198 #endif
00199 #ifdef __minix_vmd
00200 #define FIXUP_CPP_WHITESPACE
00201 #endif
00202
00203
00204
00205
00206
00207
00208
00209 #ifdef hpux
00210 #define USE_CC_E
00211 #endif
00212 #ifdef WIN32
00213 #define USE_CC_E
00214 #define DEFAULT_CC "cl"
00215 #endif
00216 #ifdef apollo
00217 #define DEFAULT_CPP "/usr/lib/cpp"
00218 #endif
00219 #if defined(_IBMR2) && !defined(DEFAULT_CPP)
00220 #define DEFAULT_CPP "/usr/lpp/X11/Xamples/util/cpp/cpp"
00221 #endif
00222 #if defined(sun) && defined(SVR4)
00223 #define DEFAULT_CPP "/usr/ccs/lib/cpp"
00224 #endif
00225 #ifdef __bsdi__
00226 #define DEFAULT_CPP "/usr/bin/cpp"
00227 #endif
00228 #ifdef __uxp__
00229 #define DEFAULT_CPP "/usr/ccs/lib/cpp"
00230 #endif
00231 #ifdef __sxg__
00232 #define DEFAULT_CPP "/usr/lib/cpp"
00233 #endif
00234 #ifdef _CRAY
00235 #define DEFAULT_CPP "/lib/pcpp"
00236 #endif
00237 #if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
00238 #define DEFAULT_CPP "/usr/libexec/cpp"
00239 #endif
00240 #ifdef MACH
00241 #define USE_CC_E
00242 #endif
00243 #ifdef __minix_vmd
00244 #define DEFAULT_CPP "/usr/lib/cpp"
00245 #endif
00246 #if defined(__EMX__)
00247
00248 #define DEFAULT_CPP "cpp"
00249 #endif
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268 #define ARGUMENTS 50
00269 char *cpp_argv[ARGUMENTS] = {
00270 "cc",
00271 "-I.",
00272 #ifdef unix
00273 "-Uunix",
00274 #endif
00275 #if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(MACH)
00276 # ifdef __i386__
00277 "-D__i386__",
00278 # endif
00279 # ifdef __GNUC__
00280 "-traditional"
00281 # endif
00282 #endif
00283 #ifdef M4330
00284 "-DM4330",
00285 #endif
00286 #ifdef M4310
00287 "-DM4310",
00288 #endif
00289 #if defined(macII) || defined(_AUX_SOURCE)
00290 "-DmacII",
00291 #endif
00292 #ifdef USL
00293 "-DUSL",
00294 #endif
00295 #ifdef sony
00296 "-Dsony",
00297 #if !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV) && NEWSOS < 42
00298 "-Dbsd43",
00299 #endif
00300 #endif
00301 #ifdef _IBMR2
00302 "-D_IBMR2",
00303 #ifndef aix
00304 #define aix
00305 #endif
00306 #endif
00307 #ifdef aix
00308 "-Daix",
00309 #ifndef ibm
00310 #define ibm
00311 #endif
00312 #endif
00313 #ifdef ibm
00314 "-Dibm",
00315 #endif
00316 #ifdef luna
00317 "-Dluna",
00318 #ifdef luna1
00319 "-Dluna1",
00320 #endif
00321 #ifdef luna88k
00322 "-traditional",
00323 #endif
00324 #ifdef uniosb
00325 "-Duniosb",
00326 #endif
00327 #ifdef uniosu
00328 "-Duniosu",
00329 #endif
00330 #endif
00331 #ifdef _CRAY
00332 "-Ucray",
00333 #endif
00334 #ifdef Mips
00335 "-DMips",
00336 # if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
00337 "-DBSD43",
00338 # else
00339 "-DSYSV",
00340 # endif
00341 #endif
00342 #ifdef MOTOROLA
00343 "-DMOTOROLA",
00344 # ifdef SYSV
00345 "-DSYSV",
00346 # endif
00347 # ifdef SVR4
00348 "-DSVR4",
00349 # endif
00350 #endif
00351 #ifdef i386
00352 # ifdef SVR4
00353 "-Di386",
00354 "-DSVR4",
00355 # endif
00356 # ifdef SYSV
00357 "-Di386",
00358 "-DSYSV",
00359 # ifdef ISC
00360 "-DISC",
00361 # ifdef ISC40
00362 "-DISC40",
00363 # else
00364 # ifdef ISC202
00365 "-DISC202",
00366 # else
00367 # ifdef ISC30
00368 "-DISC30",
00369 # else
00370 "-DISC22",
00371 # endif
00372 # endif
00373 # endif
00374 # endif
00375 # ifdef SCO
00376 "-DSCO",
00377 # ifdef SCO324
00378 "-DSCO324",
00379 # endif
00380 # endif
00381 # endif
00382 # ifdef ESIX
00383 "-Di386",
00384 "-DESIX",
00385 # endif
00386 # ifdef ATT
00387 "-Di386",
00388 "-DATT",
00389 # endif
00390 # ifdef DELL
00391 "-Di386",
00392 "-DDELL",
00393 # endif
00394 #endif
00395 #ifdef SYSV386
00396 "-Di386",
00397 # ifdef SVR4
00398 "-DSVR4",
00399 # endif
00400 # ifdef ISC
00401 "-DISC",
00402 # ifdef ISC40
00403 "-DISC40",
00404 # else
00405 # ifdef ISC202
00406 "-DISC202",
00407 # else
00408 # ifdef ISC30
00409 "-DISC30",
00410 # else
00411 "-DISC22",
00412 # endif
00413 # endif
00414 # endif
00415 # endif
00416 # ifdef SCO
00417 "-DSCO",
00418 # ifdef SCO324
00419 "-DSCO324",
00420 # endif
00421 # endif
00422 # ifdef ESIX
00423 "-DESIX",
00424 # endif
00425 # ifdef ATT
00426 "-DATT",
00427 # endif
00428 # ifdef DELL
00429 "-DDELL",
00430 # endif
00431 #endif
00432 #ifdef __osf__
00433 "-D__osf__",
00434 # ifdef __mips__
00435 "-D__mips__",
00436 # endif
00437 # ifdef __alpha
00438 "-D__alpha",
00439 # endif
00440 # ifdef __i386__
00441 "-D__i386__",
00442 # endif
00443 # ifdef __GNUC__
00444 "-traditional"
00445 # endif
00446 #endif
00447 #ifdef Oki
00448 "-DOki",
00449 #endif
00450 #ifdef sun
00451 #ifdef SVR4
00452 "-DSVR4",
00453 #endif
00454 #endif
00455 #ifdef WIN32
00456 "-DWIN32",
00457 "-nologo",
00458 "-batch",
00459 "-D__STDC__",
00460 #endif
00461 #ifdef NCR
00462 "-DNCR",
00463 #endif
00464 #ifdef linux
00465 "-traditional",
00466 "-Dlinux",
00467 #endif
00468 #ifdef __uxp__
00469 "-D__uxp__",
00470 #endif
00471 #ifdef __sxg__
00472 "-D__sxg__",
00473 #endif
00474 #ifdef nec_ews_svr2
00475 "-Dnec_ews_svr2",
00476 #endif
00477 #ifdef AMOEBA
00478 "-DAMOEBA",
00479 # ifdef CROSS_COMPILE
00480 "-DCROSS_COMPILE",
00481 # ifdef CROSS_i80386
00482 "-Di80386",
00483 # endif
00484 # ifdef CROSS_sparc
00485 "-Dsparc",
00486 # endif
00487 # ifdef CROSS_mc68000
00488 "-Dmc68000",
00489 # endif
00490 # else
00491 # ifdef i80386
00492 "-Di80386",
00493 # endif
00494 # ifdef sparc
00495 "-Dsparc",
00496 # endif
00497 # ifdef mc68000
00498 "-Dmc68000",
00499 # endif
00500 # endif
00501 #endif
00502 #ifdef __minix_vmd
00503 "-Dminix",
00504 #endif
00505
00506 #if defined(__EMX__)
00507 "-traditional",
00508 "-Demxos2",
00509 #endif
00510
00511 };
00512 #else
00513
00514
00515
00516
00517
00518
00519 struct symtab predefs[] = {
00520 #ifdef apollo
00521 {"apollo", "1"},
00522 #endif
00523 #ifdef ibm032
00524 {"ibm032", "1"},
00525 #endif
00526 #ifdef ibm
00527 {"ibm", "1"},
00528 #endif
00529 #ifdef aix
00530 {"aix", "1"},
00531 #endif
00532 #ifdef sun
00533 {"sun", "1"},
00534 #endif
00535 #ifdef sun2
00536 {"sun2", "1"},
00537 #endif
00538 #ifdef sun3
00539 {"sun3", "1"},
00540 #endif
00541 #ifdef sun4
00542 {"sun4", "1"},
00543 #endif
00544 #ifdef sparc
00545 {"sparc", "1"},
00546 #endif
00547 #ifdef __sparc__
00548 {"__sparc__", "1"},
00549 #endif
00550 #ifdef hpux
00551 {"hpux", "1"},
00552 #endif
00553 #ifdef __hpux
00554 {"__hpux", "1"},
00555 #endif
00556 #ifdef __hp9000s800
00557 {"__hp9000s800", "1"},
00558 #endif
00559 #ifdef __hp9000s700
00560 {"__hp9000s700", "1"},
00561 #endif
00562 #ifdef vax
00563 {"vax", "1"},
00564 #endif
00565 #ifdef VMS
00566 {"VMS", "1"},
00567 #endif
00568 #ifdef cray
00569 {"cray", "1"},
00570 #endif
00571 #ifdef CRAY
00572 {"CRAY", "1"},
00573 #endif
00574 #ifdef _CRAY
00575 {"_CRAY", "1"},
00576 #endif
00577 #ifdef att
00578 {"att", "1"},
00579 #endif
00580 #ifdef mips
00581 {"mips", "1"},
00582 #endif
00583 #ifdef __mips__
00584 {"__mips__", "1"},
00585 #endif
00586 #ifdef ultrix
00587 {"ultrix", "1"},
00588 #endif
00589 #ifdef stellar
00590 {"stellar", "1"},
00591 #endif
00592 #ifdef mc68000
00593 {"mc68000", "1"},
00594 #endif
00595 #ifdef mc68020
00596 {"mc68020", "1"},
00597 #endif
00598 #ifdef __GNUC__
00599 {(char *)"__GNUC__", (char *)"1"},
00600 #endif
00601 #if __STDC__
00602 {(char *)"__STDC__", (char *)"1"},
00603 #endif
00604 #ifdef __HIGHC__
00605 {"__HIGHC__", "1"},
00606 #endif
00607 #ifdef CMU
00608 {"CMU", "1"},
00609 #endif
00610 #ifdef luna
00611 {"luna", "1"},
00612 #ifdef luna1
00613 {"luna1", "1"},
00614 #endif
00615 #ifdef luna2
00616 {"luna2", "1"},
00617 #endif
00618 #ifdef luna88k
00619 {"luna88k", "1"},
00620 #endif
00621 #ifdef uniosb
00622 {"uniosb", "1"},
00623 #endif
00624 #ifdef uniosu
00625 {"uniosu", "1"},
00626 #endif
00627 #endif
00628 #ifdef ieeep754
00629 {"ieeep754", "1"},
00630 #endif
00631 #ifdef is68k
00632 {"is68k", "1"},
00633 #endif
00634 #ifdef m68k
00635 {"m68k", "1"},
00636 #endif
00637 #ifdef m88k
00638 {"m88k", "1"},
00639 #endif
00640 #ifdef __m88k__
00641 {"__m88k__", "1"},
00642 #endif
00643 #ifdef bsd43
00644 {"bsd43", "1"},
00645 #endif
00646 #ifdef hcx
00647 {"hcx", "1"},
00648 #endif
00649 #ifdef sony
00650 {"sony", "1"},
00651 #ifdef SYSTYPE_SYSV
00652 {"SYSTYPE_SYSV", "1"},
00653 #endif
00654 #ifdef _SYSTYPE_SYSV
00655 {"_SYSTYPE_SYSV", "1"},
00656 #endif
00657 #endif
00658 #ifdef __OSF__
00659 {"__OSF__", "1"},
00660 #endif
00661 #ifdef __osf__
00662 {"__osf__", "1"},
00663 #endif
00664 #ifdef __alpha
00665 {"__alpha", "1"},
00666 #endif
00667 #ifdef __DECC
00668 {"__DECC", "1"},
00669 #endif
00670 #ifdef __decc
00671 {"__decc", "1"},
00672 #endif
00673 #ifdef __uxp__
00674 {"__uxp__", "1"},
00675 #endif
00676 #ifdef __sxg__
00677 {"__sxg__", "1"},
00678 #endif
00679 #ifdef _SEQUENT_
00680 {"_SEQUENT_", "1"},
00681 {"__STDC__", "1"},
00682 #endif
00683 #ifdef __bsdi__
00684 {"__bsdi__", "1"},
00685 #endif
00686 #ifdef nec_ews_svr2
00687 {"nec_ews_svr2", "1"},
00688 #endif
00689 #ifdef nec_ews_svr4
00690 {"nec_ews_svr4", "1"},
00691 #endif
00692 #ifdef _nec_ews_svr4
00693 {"_nec_ews_svr4", "1"},
00694 #endif
00695 #ifdef _nec_up
00696 {"_nec_up", "1"},
00697 #endif
00698 #ifdef SX
00699 {"SX", "1"},
00700 #endif
00701 #ifdef nec
00702 {"nec", "1"},
00703 #endif
00704 #ifdef _nec_ft
00705 {"_nec_ft", "1"},
00706 #endif
00707 #ifdef PC_UX
00708 {(char *)"PC_UX", (char *)"1"},
00709 #endif
00710 #ifdef __EMX__
00711 {"__EMX__", "1"},
00712 #endif
00713
00714 {NULL, NULL}
00715 };
00716
00717 #endif
00718 #endif