mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-13 05:10:07 +08:00
Detect native version from default gcc target.
This commit is contained in:
parent
ec6a997f80
commit
9817204d8a
@ -3,10 +3,10 @@
|
|||||||
# It requires Cygwin 64 and gcc to bootstrap a first tcc version which is used
|
# It requires Cygwin 64 and gcc to bootstrap a first tcc version which is used
|
||||||
# by a second stage to compile tcc it self.
|
# by a second stage to compile tcc it self.
|
||||||
# Generated binaries do not require cygwin to run.
|
# Generated binaries do not require cygwin to run.
|
||||||
# You can launch 'tarball' target to build a tar.gz you can install on any Windows
|
# You can launch 'tarball' target to build a tar.gz you can install on any
|
||||||
# machines.
|
# Windows machines.
|
||||||
|
|
||||||
ARCH = 64
|
ARCH = $(shell if `gcc -v 2>&1 | grep Target | grep -q x86_64`; then echo 64; else echo 32; fi)
|
||||||
VERSION = $(shell cat ../VERSION)
|
VERSION = $(shell cat ../VERSION)
|
||||||
BOOTCC = gcc
|
BOOTCC = gcc
|
||||||
CFLAGS = -s -fno-strict-aliasing -Wno-incompatible-pointer-types -DTCC_TARGET_PE -DONE_SOURCE
|
CFLAGS = -s -fno-strict-aliasing -Wno-incompatible-pointer-types -DTCC_TARGET_PE -DONE_SOURCE
|
||||||
@ -20,6 +20,7 @@ PREFIX = i386
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
all: pre bootstrap libs rebuild
|
all: pre bootstrap libs rebuild
|
||||||
|
@chmod 775 *.exe
|
||||||
@ls -ls *.exe
|
@ls -ls *.exe
|
||||||
|
|
||||||
pre:
|
pre:
|
||||||
@ -90,11 +91,11 @@ rebuild:
|
|||||||
@echo Rebuild using tcc itself - default $(ARCH)bits
|
@echo Rebuild using tcc itself - default $(ARCH)bits
|
||||||
@./$(PREFIX)-win32-tcc $(NATIVE) -DTCC_TARGET_PE -DONE_SOURCE -o tcc.exe ../tcc.c libtcc.dll
|
@./$(PREFIX)-win32-tcc $(NATIVE) -DTCC_TARGET_PE -DONE_SOURCE -o tcc.exe ../tcc.c libtcc.dll
|
||||||
@./$(PREFIX)-win32-tcc $(NATIVE) -DTCC_TARGET_PE -DONE_SOURCE -o tiny_libmaker.exe tools/tiny_libmaker.c
|
@./$(PREFIX)-win32-tcc $(NATIVE) -DTCC_TARGET_PE -DONE_SOURCE -o tiny_libmaker.exe tools/tiny_libmaker.c
|
||||||
@./tcc -m64 -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_X86_64 -DLIBTCC_AS_DLL -o libtcc.dll -shared ../libtcc.c
|
@./tcc $(NATIVE) -DTCC_TARGET_PE -DONE_SOURCE -DLIBTCC_AS_DLL -o libtcc.dll -shared ../libtcc.c
|
||||||
@./tcc -m64 -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_I386 -o i386-win32-tcc.exe ../tcc.c
|
@./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
|
||||||
@./tcc -m64 -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_I386 -o tiny_libmaker32.exe tools/tiny_libmaker.c
|
@./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
|
||||||
@./tcc -m64 -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_X86_64 -o x86_64-win32-tcc.exe ../tcc.c
|
@./tcc -m$(ARCH) -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_I386 -o tiny_libmaker32.exe tools/tiny_libmaker.c
|
||||||
@./tcc -m64 -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_X86_64 -o tiny_libmaker64.exe tools/tiny_libmaker.c
|
@./tcc -m$(ARCH) -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_X86_64 -o tiny_libmaker64.exe tools/tiny_libmaker.c
|
||||||
|
|
||||||
PHONY += rebuild
|
PHONY += rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user