1 /* quake3 bytecode target */
5 #include "../../../qcommon/q_platform.h"
13 char *suffixes[] = { ".c", ".i", ".asm", ".o", ".out", 0 };
14 char inputs[256] = "";
15 char *cpp[] = { "q3cpp" BINEXT,
16 "-D__STDC__=1", "-D__STRICT_ANSI__", "-D__signed__=signed", "-DQ3_VM",
17 "$1", "$2", "$3", 0 };
18 char *include[] = { 0 };
19 char *com[] = { "q3rcc" BINEXT, "-target=bytecode", "$1", "$2", "$3", 0 };
23 extern char *concat(char *, char *);
29 Updates the paths to q3cpp and q3rcc based on
30 the directory that contains q3lcc
33 void UpdatePaths( const char *lccBinary )
35 char basepath[ 1024 ];
38 strncpy( basepath, lccBinary, 1024 );
39 p = strrchr( basepath, PATH_SEP );
45 cpp[ 0 ] = concat( basepath, "q3cpp" BINEXT );
46 com[ 0 ] = concat( basepath, "q3rcc" BINEXT );
50 int option(char *arg) {
51 if (strncmp(arg, "-lccdir=", 8) == 0) {
52 cpp[0] = concat(&arg[8], "/q3cpp" BINEXT);
53 include[0] = concat("-I", concat(&arg[8], "/include"));
54 com[0] = concat(&arg[8], "/q3rcc" BINEXT);
55 } else if (strcmp(arg, "-p") == 0 || strcmp(arg, "-pg") == 0) {
56 fprintf( stderr, "no profiling supported, %s ignored.\n", arg);
57 } else if (strcmp(arg, "-b") == 0)
59 else if (strcmp(arg, "-g") == 0)
60 fprintf( stderr, "no debugging supported, %s ignored.\n", arg);
61 else if (strncmp(arg, "-ld=", 4) == 0 || strcmp(arg, "-static") == 0) {
62 fprintf( stderr, "no linking supported, %s ignored.\n", arg);