diff options
| author | Henry Kroll III <henry@comptune.com> | 2010-04-25 00:35:25 -0700 |
|---|---|---|
| committer | Henry Kroll III <henry@comptune.com> | 2010-04-25 00:35:25 -0700 |
| commit | 07eb8506089c6d52d759a4436eb1e35225a49941 (patch) | |
| tree | 95f86dea3e8e3576b568533a541049d6663b7c4a /Makefile | |
| parent | 1a8e7d9fbb5376cb51925bb5d1f0f8c5807a997e (diff) | |
| download | tinycc-07eb8506089c6d52d759a4436eb1e35225a49941.tar.gz tinycc-07eb8506089c6d52d759a4436eb1e35225a49941.tar.bz2 | |
make --enable-cross work properly on x86_64
merge more changes from Fedora spec file into Makefile
I did a lot of reading on Makefiles. It should be a lot less hacked now that I got rid of my temporary cross-build script. I had to build i386-win32-tcc as 32 bit in order to use it to build the windows version of libtcc1.a and move that into lib directory. Still testing, but it does build windows fib.exe smoothly now and generates shard lib, libtcc.so.1.0 and test links against it.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -183,15 +183,20 @@ libtcc_test$(EXESUF): tests/libtcc_test.c $(LIBTCCB) $(CC) -o $@ $^ -I. $(CFLAGS) $(LIBS) $(LIBTCCL) ifdef CONFIG_CROSS ifndef CONFIG_WIN32 + cp config.mak config.mak.bak + cp config.h config.h.bak echo "ARCH=i386" >> config.mak - make i386-win32-tcc + echo "#undef HOST_X86_64" >> config.h + echo "#define HOST_I386 1" >> config.h + echo "CFLAGS=-O2 -g -pipe -Wall -m32" >> config.mak + make i386-win32-tcc cp i386-win32-tcc tcc.exe mv libtcc1.a libtcc1.bak make CONFIG_WIN32=1 libtcc1.a mv libtcc1.a lib mv libtcc1.bak libtcc1.a - head -n -1 config.mak > config.bak - mv config.bak config.mak + mv config.mak.bak config.mak + mv config.h.bak config.h endif endif |
