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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [lcc/] [etc/] [win32.c] - Blame information for rev 72

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

Line No. Rev Author Line
1 4 hellwig
/* x86s running MS Windows NT 4.0 */
2
 
3
#include <string.h>
4
 
5
static char rcsid[] = "$Id: win32.c,v 1.19 2001/07/09 18:00:13 drh Exp $";
6
 
7
#ifndef LCCDIR
8
#define LCCDIR "\\progra~1\\lcc\\4.1\\bin\\"
9
#endif
10
 
11
char *suffixes[] = { ".c;.C", ".i;.I", ".asm;.ASM;.s;.S", ".obj;.OBJ", ".exe", 0 };
12
char inputs[256] = "";
13
char *cpp[] = { LCCDIR "cpp", "-D__STDC__=1", "-Dwin32", "-D_WIN32", "-D_M_IX86",
14
        "$1", "$2", "$3", 0 };
15
char *include[] = { "-I" LCCDIR "include", 0 };
16
char *com[] = { LCCDIR "rcc", "-target=x86/win32", "$1", "$2", "$3", 0 };
17
char *as[] = { "ml", "-nologo", "-c", "-Cp", "-coff", "-Fo$3", "$1", "$2", 0 };
18
char *ld[] = { "link", "-nologo",
19
        "", "-subsystem:console", "-entry:mainCRTStartup",
20
        "$2", "-OUT:$3", "$1", LCCDIR "liblcc.lib", "oldnames.lib", "libc.lib", "kernel32.lib", 0 };
21
 
22
extern char *concat(char *, char *);
23
extern char *replace(const char *, int, int);
24
 
25
int option(char *arg) {
26
        if (strncmp(arg, "-lccdir=", 8) == 0) {
27
                arg = replace(arg + 8, '/', '\\');
28
                if (arg[strlen(arg)-1] == '\\')
29
                        arg[strlen(arg)-1] = '\0';
30
                cpp[0] = concat(arg, "\\cpp.exe");
31
                include[0] = concat("-I", concat(arg, "\\include"));
32
                com[0] = concat(arg, "\\rcc.exe");
33
                ld[8] = concat(arg, "\\liblcc.lib");
34
        } else if (strcmp(arg, "-b") == 0)
35
                ;
36
        else if (strncmp(arg, "-ld=", 4) == 0)
37
                ld[0] = &arg[4];
38
        else
39
                return 0;
40
        return 1;
41
}

powered by: WebSVN 2.1.0

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