OpenCores
URL https://opencores.org/ocsvn/eco32/eco32/trunk

Subversion Repositories eco32

[/] [eco32/] [trunk/] [lcc/] [etc/] [osf.c] - Blame information for rev 130

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 hellwig
/* DEC ALPHAs running OSF/1 V3.2A (Rev. 17) at Princeton University */
2
 
3
#include <string.h>
4
 
5
static char rcsid[] = "$Id: osf.c,v 1.8 1997/05/26 22:34:10 drh Exp $";
6
 
7
#ifndef LCCDIR
8
#define LCCDIR "/usr/local/lib/lcc/"
9
#endif
10
 
11
char *suffixes[] = { ".c", ".i", ".s", ".o", ".out", 0 };
12
char inputs[256] = "";
13
char *cpp[] = {
14
        LCCDIR "cpp", "-D__STDC__=1",
15
        "-DLANGUAGE_C", "-D__LANGUAGE_C__",
16
        "-D_unix", "-D__unix__", "-D_osf", "-D__osf__", "-Dunix",
17
        "-Dalpha", "-D_alpha", "-D__alpha",
18
        "-D__SYSTYPE_BSD",  "-D_SYSTYPE_BSD",
19
        "$1", "$2", "$3", 0 };
20
char *com[] =  { LCCDIR "rcc", "-target=alpha/osf", "$1", "$2", "$3", "", 0 };
21
char *include[] = { "-I" LCCDIR "include", "-I/usr/local/include",
22
        "-I/usr/include", 0 };
23
char *as[] =  { "/bin/as", "-o", "$3", "", "$1", "-nocpp", "$2", 0 };
24
char *ld[] =  { "/usr/bin/ld", "-o", "$3", "/usr/lib/cmplrs/cc/crt0.o",
25
        "$1", "$2", "", "", "-L" LCCDIR, "-llcc", "-lm", "-lc", 0 };
26
 
27
extern char *concat(char *, char *);
28
extern int access(const char *, int);
29
 
30
int option(char *arg) {
31
        if (strncmp(arg, "-lccdir=", 8) == 0) {
32
                cpp[0] = concat(&arg[8], "/cpp");
33
                include[0] = concat("-I", concat(&arg[8], "/include"));
34
                com[0] = concat(&arg[8], "/rcc");
35
                ld[8] = concat("-L", &arg[8]);
36
        } else if (strcmp(arg, "-g4") == 0
37
        && access("/u/drh/lib/alpha/rcc", 4) == 0
38
        && access("/u/drh/book/cdb/alpha/osf/cdbld", 4) == 0) {
39
                com[0] = "/u/drh/lib/alpha/rcc";
40
                com[5] = "-g4";
41
                ld[0] = "/u/drh/book/cdb/alpha/osf/cdbld";
42
                ld[1] = "-o";
43
                ld[2] = "$3";
44
                ld[3] = "$1";
45
                ld[4] = "$2";
46
                ld[5] = 0;
47
        } else if (strcmp(arg, "-g") == 0)
48
                return 1;
49
        else if (strcmp(arg, "-b") == 0)
50
                ;
51
        else
52
                return 0;
53
        return 1;
54
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.