History

Detect native version from default gcc target.

Christian Jullien committed 9 years ago

Commit 98172041 parent ec6a9971 file · +9 −8Browse files

Unified · Split

win32/Makefile+9−8
@@ -3,10 +3,10 @@ · 2 unmodified lines
33 # It requires Cygwin 64 and gcc to bootstrap a first tcc version which is used
44 # by a second stage to compile tcc it self.
55 # 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.
88
9−ARCH = 64
9+ARCH = $(shell if `gcc -v 2>&1 | grep Target | grep -q x86_64`; then echo 64; else echo 32; fi)
1010 VERSION = $(shell cat ../VERSION)
1111 BOOTCC = gcc
1212 CFLAGS = -s -fno-strict-aliasing -Wno-incompatible-pointer-types -DTCC_TARGET_PE -DONE_SOURCE
@@ -20,6 +20,7 @@ PREFIX = i386 · 7 unmodified lines
2020 endif
2121
2222 all: pre bootstrap libs rebuild
23+ @chmod 775 *.exe
2324 @ls -ls *.exe
2425
2526 pre:
@@ -90,11 +91,11 @@ rebuild: · 64 unmodified lines
9091 @echo Rebuild using tcc itself - default $(ARCH)bits
9192 @./$(PREFIX)-win32-tcc $(NATIVE) -DTCC_TARGET_PE -DONE_SOURCE -o tcc.exe ../tcc.c libtcc.dll
9293 @./$(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
9899
99100 PHONY += rebuild
100101

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t