1 /* x86 running linux and using nasm as a.out */
6 #define LCCDIR "/usr/local/lib/lcc/"
9 #define NASMPATH "/usr/local/bin/nasm"
11 char *cpp
[] = { LCCDIR
"cpp", "-D__STDC__=1",
12 "-Di386", "-D__i386", "-D__i386__",
13 "-Dlinux", "-D__linux", "-D__linux__",
14 "-Dunix", "-D__unix", "-D__unix__",
17 char *include
[] = { "-I" LCCDIR
"include", "-I/usr/local/include",
20 char *com
[] = { LCCDIR
"rcc", "-target=x86/nasm",
23 char *as
[] = { NASMPATH
, "-a", "-faout", "-o", "$3", "$1", "$2", 0 };
24 char *ld
[] = { "/usr/bin/ld", "-m", "i386linux",
25 "-L/usr/i486-linuxaout/lib",
27 "/usr/i486-linuxaout/lib/crt0.o",
30 static char *bbexit
= LCCDIR
"bbexit.o";
32 extern char *concat(char *, char *);
33 extern int access(const char *, int);
37 if (strncmp(arg
, "-lccdir=", 8) == 0) {
38 cpp
[0] = concat(&arg
[8], "/cpp");
39 include
[0] = concat("-I", concat(&arg
[8], "/include"));
40 com
[0] = concat(&arg
[8], "/rcc");
41 bbexit
= concat(&arg
[8], "/bbexit.o");
42 } else if (strcmp(arg
, "-g") == 0) ;
43 else if (strcmp(arg
, "-b") == 0 && access(bbexit
, 4) == 0)