aboutsummaryrefslogtreecommitdiff
path: root/libtcc.c
diff options
context:
space:
mode:
authorgrischka <grischka>2010-12-04 16:47:08 +0100
committergrischka <grischka>2010-12-04 16:47:08 +0100
commit86ffc4812952f11a35afa19b24a3e6d1a12f4490 (patch)
tree7793f0de96d21eae73564d907f97fb25e85a69eb /libtcc.c
parent2ce9a0e2fe10a4e9a851ff2b8d4c14b36fff5eef (diff)
downloadtinycc-86ffc4812952f11a35afa19b24a3e6d1a12f4490.tar.gz
tinycc-86ffc4812952f11a35afa19b24a3e6d1a12f4490.tar.bz2
make: new lib/Makefile for libtcc1.a on more platforms
win32/64 cross-compilers now build libtcc1.a and install it together with the windows headers in a 'win32' sub-directory of TCCDIR.
Diffstat (limited to 'libtcc.c')
-rw-r--r--libtcc.c28
1 files changed, 3 insertions, 25 deletions
diff --git a/libtcc.c b/libtcc.c
index c0c3585..483670a 100644
--- a/libtcc.c
+++ b/libtcc.c
@@ -1273,16 +1273,11 @@ 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
}
@@ -1323,30 +1318,13 @@ 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);
+#ifdef CONFIG_TCC_CROSSLIB
+ snprintf(buf, sizeof(buf), "%s/" CONFIG_TCC_CROSSLIB, 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