diff options
| author | grischka <grischka> | 2009-12-20 01:53:49 +0100 |
|---|---|---|
| committer | grischka <grischka> | 2009-12-20 01:53:49 +0100 |
| commit | 88a3ccab9f3c877e2ffb8fecc3303006e0640907 (patch) | |
| tree | 47092d8442f4d7f1e4714643acf25787556d1e10 /tcc.c | |
| parent | 7fa712e00c5221d9373e8f8fa073e9e6fa064da1 (diff) | |
| download | tinycc-88a3ccab9f3c877e2ffb8fecc3303006e0640907.tar.gz tinycc-88a3ccab9f3c877e2ffb8fecc3303006e0640907.tar.bz2 | |
allow tcc be build from separate objects
If you want that, run: make NOTALLINONE=1
Diffstat (limited to 'tcc.c')
| -rw-r--r-- | tcc.c | 32 |
1 files changed, 16 insertions, 16 deletions
@@ -18,13 +18,25 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef TCC_USE_LIBTCC +#if defined NOTALLINONE || defined TCC_USE_LIBTCC #include "tcc.h" #else #include "libtcc.c" #endif -void help(void) +static char **files; +static int nb_files, nb_libraries; +static int multiple_files; +static int print_search_dirs; +static int output_type; +static int reloc_output; +static const char *outfile; +static int do_bench = 0; + +#define TCC_OPTION_HAS_ARG 0x0001 +#define TCC_OPTION_NOSEP 0x0002 /* cannot have space before option and arg */ + +static void help(void) { printf("tcc version " TCC_VERSION " - Tiny C Compiler - Copyright (C) 2001-2006 Fabrice Bellard\n" "usage: tcc [-v] [-c] [-o outfile] [-Bdir] [-bench] [-Idir] [-Dsym[=val]] [-Usym]\n" @@ -65,18 +77,6 @@ void help(void) ); } -static char **files; -static int nb_files, nb_libraries; -static int multiple_files; -static int print_search_dirs; -static int output_type; -static int reloc_output; -static const char *outfile; -static int do_bench = 0; - -#define TCC_OPTION_HAS_ARG 0x0001 -#define TCC_OPTION_NOSEP 0x0002 /* cannot have space before option and arg */ - typedef struct TCCOption { const char *name; uint16_t index; @@ -213,7 +213,7 @@ static int expand_args(char ***pargv, const char *str) return argc; } -int parse_args(TCCState *s, int argc, char **argv) +static int parse_args(TCCState *s, int argc, char **argv) { int optind; const TCCOption *popt; @@ -304,7 +304,7 @@ int parse_args(TCCState *s, int argc, char **argv) break; #ifdef CONFIG_TCC_BACKTRACE case TCC_OPTION_bt: - num_callers = atoi(optarg); + set_num_callers(atoi(optarg)); break; #endif #ifdef CONFIG_TCC_BCHECK |
