diff options
| author | Henry Kroll III <henry@comptune.com> | 2010-12-02 03:08:57 -0800 |
|---|---|---|
| committer | Henry Kroll III <henry@comptune.com> | 2010-12-02 03:08:57 -0800 |
| commit | a2779556b49c101d95f1b7a42f61a285a3898ae6 (patch) | |
| tree | 3db0f3df8fe8f6540686c862d18562b234c92c53 /libtcc.c | |
| parent | 03b23994f190679cd0ac7b995beda5f9af367ecd (diff) | |
| download | tinycc-a2779556b49c101d95f1b7a42f61a285a3898ae6.tar.gz tinycc-a2779556b49c101d95f1b7a42f61a285a3898ae6.tar.bz2 | |
split cross libtcc1.a to separate directories
Diffstat (limited to 'libtcc.c')
| -rw-r--r-- | libtcc.c | 28 |
1 files changed, 27 insertions, 1 deletions
@@ -1273,11 +1273,16 @@ LIBTCCAPI int tcc_set_output_type(TCCState *s, int output_type) tcc_add_sysinclude_path(s, CONFIG_SYSROOT "/usr/local/include"); tcc_add_sysinclude_path(s, CONFIG_SYSROOT "/usr/include"); #endif + tcc_add_sysinclude_path(s, CONFIG_SYSROOT CONFIG_TCCDIR "/include"); snprintf(buf, sizeof(buf), "%s/include", s->tcc_lib_path); tcc_add_sysinclude_path(s, buf); #ifdef TCC_TARGET_PE + snprintf(buf, sizeof(buf), "%s/win32/include", s->tcc_lib_path); + tcc_add_sysinclude_path(s, buf); snprintf(buf, sizeof(buf), "%s/include/winapi", s->tcc_lib_path); tcc_add_sysinclude_path(s, buf); + snprintf(buf, sizeof(buf), "%s/win32/include/winapi", s->tcc_lib_path); + tcc_add_sysinclude_path(s, buf); #endif } @@ -1318,9 +1323,30 @@ LIBTCCAPI int tcc_set_output_type(TCCState *s, int output_type) tcc_add_file(s, CONFIG_TCC_CRT_PREFIX "/crt1.o"); tcc_add_file(s, CONFIG_TCC_CRT_PREFIX "/crti.o"); } +#if defined(TCC_TARGET_X86_64) + snprintf(buf, sizeof(buf), "%s/lib64", s->tcc_lib_path); + tcc_set_lib_path(s, buf); +#elif defined(TCC_TARGET_I386) + snprintf(buf, sizeof(buf), "%s/lib", s->tcc_lib_path); + tcc_set_lib_path(s, buf); +#endif #endif - #ifdef TCC_TARGET_PE + snprintf(buf, sizeof(buf), "%s/win32/lib", s->tcc_lib_path); + tcc_add_library_path(s, buf); +#if defined(TCC_TARGET_X86_64) + snprintf(buf, sizeof(buf), "%s/win32/lib/64", s->tcc_lib_path); + tcc_add_library_path(s, buf); + snprintf(buf, sizeof(buf), "%s/lib/64", s->tcc_lib_path); +#elif defined(TCC_TARGET_I386) + snprintf(buf, sizeof(buf), "%s/win32/lib/32", s->tcc_lib_path); + tcc_add_library_path(s, buf); + snprintf(buf, sizeof(buf), "%s/lib/32", s->tcc_lib_path); +#else + snprintf(buf, sizeof(buf), "%s/win32/lib/other", s->tcc_lib_path); +#endif + tcc_add_library_path(s, buf); + /* support deprecated -Bwin32 */ snprintf(buf, sizeof(buf), "%s/lib", s->tcc_lib_path); tcc_add_library_path(s, buf); #ifdef _WIN32 |
