Annotation of researchv10no/cmd/lcc/etc/nassau.c, revision 1.1

1.1     ! root        1: /* Sun3s & Sun4s running Sun UNIX 4.0 at Princeton University */
        !             2: 
        !             3: #include <string.h>
        !             4: 
        !             5: char *cpp[] = {
        !             6: #ifdef sparc
        !             7:        "/usr/local/lib/gcc-cpp", "-undef",             /* GNU preprocessor */
        !             8: /*     "/usr/local/lib/cpp", "-N", "-D__STDC__=1",     /* dmr's preprocessor */
        !             9:        "-Dsparc",
        !            10: #else
        !            11:        "/usr/gnu/lib/gcc-cpp", "-undef",
        !            12:        "-Dmc68000", "-Dmc68020",
        !            13: #endif
        !            14:        "-Dsun", "$1", "$2", "$3", 0 };
        !            15: char *include[] = { "-I/usr/local/include/ansi", "-I/usr/include", 0 };
        !            16: char *com[] = { "/usr/local/lib/rcc", "$1", "$2", "$3", 0 };
        !            17: char *as[] = { "/bin/as", "-o", "$3",
        !            18: #ifndef sparc
        !            19:        "-mc68020",
        !            20: #endif
        !            21:        "$1", "$2", 0 };
        !            22: char *ld[] = { "/bin/ld", "-o", "$3", "-dc", "-dp", "-e", "start", "-X",
        !            23:        "$1", "/usr/lib/crt0.o",
        !            24: #ifdef sparc
        !            25:        "", "",
        !            26: #else
        !            27:        "/usr/lib/Mcrt1.o", "-L/usr/lib/f68881",
        !            28: #endif
        !            29:        "$2", "", "", "-lm", "", "-lc", 0 };
        !            30: 
        !            31: static char *libprefix = "/cmnusr/local/lib/ldb/";
        !            32: extern char *concat();
        !            33: 
        !            34: int option(arg) char *arg; {
        !            35:        if (strcmp(arg, "-g") == 0)
        !            36:                ld[16] = "-lg";
        !            37:        else if (strcmp(arg, "-p") == 0 && strcmp(ld[9], "/usr/lib/crt0.o") == 0) {
        !            38:                ld[9]  = "/usr/lib/mcrt0.o";
        !            39:                ld[17] = "-lc_p";
        !            40:        } else if (strcmp(arg, "-pg") == 0 && strcmp(ld[9], "/usr/lib/crt0.o") == 0) {
        !            41:                ld[9]  = "/usr/lib/gcrt0.o";
        !            42:                ld[17] = "-lc_p";
        !            43:        } else if (strcmp(arg, "-b") == 0 && access("/usr/local/lib/bbexit.o", 4) == 0)
        !            44:                ld[13] = "/usr/local/lib/bbexit.o";
        !            45:        else if (strncmp(arg, "-B", 2) == 0)
        !            46:                libprefix = arg + 2;
        !            47: #ifdef sparc
        !            48:        else if (strcmp(arg, "-G") == 0 && strcmp(ld[9], "/usr/lib/crt0.o") == 0) {
        !            49:                com[0] = concat(libprefix, "sparc/rcc");
        !            50:                ld[0]  = "/cmnusr/local/lib/ldb/ldb-ld";
        !            51:                ld[9]  = concat(libprefix, "sparc/crt0.o");
        !            52:                ld[14] = concat(libprefix, "sparc/Cnub.o");
        !            53:        } else if (strncmp(arg, "ld=", 3) == 0)
        !            54:                ld[0]  = &arg[3];
        !            55: #else
        !            56:        else if (strcmp(arg, "-G") == 0 && strcmp(ld[9], "/usr/lib/crt0.o") == 0) {
        !            57:                com[0] = concat(libprefix, "sun3/rcc");
        !            58:                ld[0]  = "/cmnusr/local/lib/ldb/ldb-ld";
        !            59:                ld[9]  = concat(libprefix, "sun3/crt0.o");
        !            60:                ld[14] = concat(libprefix, "sun3/Cnub.o");
        !            61:        }
        !            62: #endif
        !            63:        else if (strcmp(arg, "-f68881") == 0)
        !            64:                ;
        !            65:        else
        !            66:                return 0;
        !            67:        return 1;
        !            68: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.