1 /* SPARCs running Solaris 2.5.1 at CS Dept., Princeton University */
5 static char rcsid
[] = "$Id$";
8 #define LCCDIR "/usr/local/lib/lcc/"
11 #define SUNDIR "/opt/SUNWspro/SC4.2/lib/"
14 char *suffixes
[] = { ".c", ".i", ".s", ".o", ".out", 0 };
15 char inputs
[256] = "";
16 char *cpp
[] = { LCCDIR
"cpp",
17 "-D__STDC__=1", "-Dsparc", "-D__sparc__", "-Dsun", "-D__sun__", "-Dunix",
18 "$1", "$2", "$3", 0 };
19 char *include
[] = { "-I" LCCDIR
"include", "-I/usr/local/include",
20 "-I/usr/include", 0 };
21 char *com
[] = { LCCDIR
"rcc", "-target=sparc/solaris",
22 "$1", "$2", "$3", 0 };
23 char *as
[] = { "/usr/ccs/bin/as", "-Qy", "-s", "-o", "$3", "$1", "$2", 0 };
24 char *ld
[] = { "/usr/ccs/bin/ld", "-o", "$3", "$1",
25 SUNDIR
"crti.o", SUNDIR
"crt1.o",
26 SUNDIR
"values-xa.o", "$2", "",
27 "-Y", "P," SUNDIR
":/usr/ccs/lib:/usr/lib", "-Qy",
28 "-L" LCCDIR
, "-llcc", "-lm", "-lc", SUNDIR
"crtn.o", 0 };
30 extern char *concat(char *, char *);
32 int option(char *arg
) {
33 if (strncmp(arg
, "-lccdir=", 8) == 0) {
34 cpp
[0] = concat(&arg
[8], "/cpp");
35 include
[0] = concat("-I", concat(&arg
[8], "/include"));
36 ld
[12] = concat("-L", &arg
[8]);
37 com
[0] = concat(&arg
[8], "/rcc");
38 } else if (strcmp(arg
, "-g") == 0)
40 else if (strcmp(arg
, "-p") == 0) {
41 ld
[5] = SUNDIR
"mcrt1.o";
42 ld
[10] = "P," SUNDIR
"libp:/usr/ccs/lib/libp:/usr/lib/libp:"
43 SUNDIR
":/usr/ccs/lib:/usr/lib";
44 } else if (strcmp(arg
, "-b") == 0)
46 else if (strncmp(arg
, "-ld=", 4) == 0)