- added definitions of _KOLIBRI, _KOLIBRI, _KOLIBRI_  by default 
- added ktcc for Windows and Linux to autobuild

git-svn-id: svn://kolibrios.org@9153 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
turbocat 2021-08-25 18:30:26 +00:00
parent b5fd9c29dc
commit e08cff4a2a
2 changed files with 9 additions and 1 deletions

View File

@ -6,3 +6,7 @@ CFLAGS = "-U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32"
compile_gcc{"tcc.c"} compile_gcc{"tcc.c"}
compile_gcc{"libtcc.c"} compile_gcc{"libtcc.c"}
link_gcc("tcc") link_gcc("tcc")
CFLAGS = " -static -m32 -DTCC_TARGET_MEOS_LINUX "
tup.rule({"tcc.c", "libtcc.c"}, "gcc" .. CFLAGS .. "%f -o %o" , "kos32-tcc")
tup.rule({"tcc.c", "libtcc.c"}, "i686-w64-mingw32-gcc" .. CFLAGS .. "%f -o %o" , "kos32-tcc.exe")

View File

@ -1174,6 +1174,10 @@ LIBTCCAPI TCCState *tcc_new(void)
# ifdef TCC_TARGET_X86_64 # ifdef TCC_TARGET_X86_64
tcc_define_symbol(s, "_WIN64", NULL); tcc_define_symbol(s, "_WIN64", NULL);
# endif # endif
#elif defined(TCC_TARGET_MEOS) || defined(TCC_TARGET_MEOS_LINUX)
tcc_define_symbol(s, "KOLIBRI", NULL);
tcc_define_symbol(s, "_KOLIBRI", NULL);
tcc_define_symbol(s, "_KOLIBRI_",NULL);
#else #else
tcc_define_symbol(s, "__unix__", NULL); tcc_define_symbol(s, "__unix__", NULL);
tcc_define_symbol(s, "__unix", NULL); tcc_define_symbol(s, "__unix", NULL);