Unified · Split
| @@ -3,10 +3,10 @@ · 2 unmodified lines | ||
| 3 | 3 | # It requires Cygwin 64 and gcc to bootstrap a first tcc version which is used |
| 4 | 4 | # by a second stage to compile tcc it self. |
| 5 | 5 | # Generated binaries do not require cygwin to run. |
| 6 | −# You can launch 'tarball' target to build a tar.gz you can install on any Windows | |
| 7 | −# machines. | |
| 6 | +# You can launch 'tarball' target to build a tar.gz you can install on any | |
| 7 | +# Windows machines. | |
| 8 | 8 | |
| 9 | −ARCH = 64 | |
| 9 | +ARCH = $(shell if `gcc -v 2>&1 | grep Target | grep -q x86_64`; then echo 64; else echo 32; fi) | |
| 10 | 10 | VERSION = $(shell cat ../VERSION) |
| 11 | 11 | BOOTCC = gcc |
| 12 | 12 | CFLAGS = -s -fno-strict-aliasing -Wno-incompatible-pointer-types -DTCC_TARGET_PE -DONE_SOURCE |
| @@ -20,6 +20,7 @@ PREFIX = i386 · 7 unmodified lines | ||
| 20 | 20 | endif |
| 21 | 21 | |
| 22 | 22 | all: pre bootstrap libs rebuild |
| 23 | + @chmod 775 *.exe | |
| 23 | 24 | @ls -ls *.exe |
| 24 | 25 | |
| 25 | 26 | pre: |
| @@ -90,11 +91,11 @@ rebuild: · 64 unmodified lines | ||
| 90 | 91 | @echo Rebuild using tcc itself - default $(ARCH)bits |
| 91 | 92 | @./$(PREFIX)-win32-tcc $(NATIVE) -DTCC_TARGET_PE -DONE_SOURCE -o tcc.exe ../tcc.c libtcc.dll |
| 92 | 93 | @./$(PREFIX)-win32-tcc $(NATIVE) -DTCC_TARGET_PE -DONE_SOURCE -o tiny_libmaker.exe tools/tiny_libmaker.c |
| 93 | − @./tcc -m64 -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_X86_64 -DLIBTCC_AS_DLL -o libtcc.dll -shared ../libtcc.c | |
| 94 | − @./tcc -m64 -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_I386 -o i386-win32-tcc.exe ../tcc.c | |
| 95 | − @./tcc -m64 -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_I386 -o tiny_libmaker32.exe tools/tiny_libmaker.c | |
| 96 | − @./tcc -m64 -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_X86_64 -o x86_64-win32-tcc.exe ../tcc.c | |
| 97 | − @./tcc -m64 -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_X86_64 -o tiny_libmaker64.exe tools/tiny_libmaker.c | |
| 94 | + @./tcc $(NATIVE) -DTCC_TARGET_PE -DONE_SOURCE -DLIBTCC_AS_DLL -o libtcc.dll -shared ../libtcc.c | |
| 95 | + @./tcc -m$(ARCH) -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_I386 -o tmp-tcc.exe ../tcc.c && mv tmp-tcc.exe i386-win32-tcc.exe | |
| 96 | + @./tcc -m$(ARCH) -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_X86_64 -o tmp-tcc.exe ../tcc.c && mv tmp-tcc.exe x86_64-win32-tcc.exe | |
| 97 | + @./tcc -m$(ARCH) -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_I386 -o tiny_libmaker32.exe tools/tiny_libmaker.c | |
| 98 | + @./tcc -m$(ARCH) -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_X86_64 -o tiny_libmaker64.exe tools/tiny_libmaker.c | |
| 98 | 99 | |
| 99 | 100 | PHONY += rebuild |
| 100 | 101 | |