My Makefile was working the same.
Now, build-tcc.bat complains because tcc fails to find some .h like;
c:\usr\jullien\tinycc\win32>.\tcc -m32 -c lib/crt1.c
lib/crt1.c:5: error: include file 'tchar.h' not found
c:\usr\jullien\tinycc\win32>.\tcc -m32 -c lib/crt1w.c
In file included from lib/crt1w.c:3:
lib/crt1.c:5: error: include file 'tchar.h' not found
The config.h generated by your script only contains:
c:\tinycc\win32>more ..\config.h
#define TCC_VERSION "0.9.27"
#ifdef TCC_TARGET_X86_64
#define TCC_LIBTCC1 "libtcc1-64.a"
#else
#define TCC_LIBTCC1 "libtcc1-32.a"
#endif
I see that in previous versions we had
#ifndef CONFIG_TCCDIR
# define CONFIG_TCCDIR "."
#endif
But now it's defined as
#ifndef CONFIG_TCCDIR
# define CONFIG_TCCDIR "/usr/local/lib/tcc"
#endif
Which looks to be the source of the problem. Adding this line in
build-tcc.bat solves the issue, is it what we should do now?
:config.h
echo>..\config.h #define TCC_VERSION "%VERSION%"
*+ echo>>..\config.h #define CONFIG_TCCDIR "%CD:\=/%"*
echo>> ..\config.h #ifdef TCC_TARGET_X86_64
*Le : *24 juillet 2017 à 18:39 (GMT +02:00)
*De : *"grischka" <address@hidden>
*À : *"Christian JULLIEN" <address@hidden>,
"address@hidden" <address@hidden>
*Objet : *Re: [Tinycc-devel] build-tcc.bat is broken since recent
changes
Christian JULLIEN wrote:
> Grischka
>
>
> Trying to synchronize Cygwin Makefile with your recent reorg, 'make'
> stops because includes are now not found.
There is a change to the default CONFIG_TCCDIR.
You can define it in the config.h that you create or use tcc -B. ...
> The same issue exists with your .bat
Not unless (ab)used with a cygwin gcc ;)
Btw, cygwin has the option to install a mingw compiler too (from the
setup
program). Then you could just use the normal configure + make like
$ ./configure --cross-prefix=i686-w64-mingw32- --prefix=c:/tcc
$ make && make install
The gcc prefix may vary (look in cygwin/bin).
-- gr