History

tiny_impldef.exe was not built by Makefile

Christian Jullien committed 9 years ago

Commit d61985b1 parent 7b99c3a1 file · +142 −140Browse files

Unified · Split

win32/Makefile+142−140
@@ -1,140 +1,142 @@
1#1#
2# This Makefile builds native Windows tcc for both 32 and 64 bits generator.2# This Makefile builds native Windows tcc for both 32 and 64 bits generator.
3# It requires Cygwin 64 and gcc to bootstrap a first tcc version which is used3# It requires Cygwin 64 and gcc to bootstrap a first tcc version which is used
4# by a second stage to compile tcc it self.4# by a second stage to compile tcc it self.
5# Generated binaries do not require cygwin to run.5# Generated binaries do not require cygwin to run.
6# You can launch 'tarball' target to build a tar.gz you can install on any6# You can launch 'tarball' target to build a tar.gz you can install on any
7# Windows machines.7# Windows machines.
8 8
9ARCH = $(shell if `gcc -v 2>&1 | grep Target | grep -q x86_64`; then echo 64; else echo 32; fi)9ARCH = $(shell if `gcc -v 2>&1 | grep Target | grep -q x86_64`; then echo 64; else echo 32; fi)
10VERSION = $(shell cat ../VERSION)10VERSION = $(shell cat ../VERSION)
11BOOTCC = gcc11BOOTCC = gcc
12CFLAGS = -s -fno-strict-aliasing -Wno-incompatible-pointer-types -DTCC_TARGET_PE -DONE_SOURCE12CFLAGS = -s -fno-strict-aliasing -Wno-incompatible-pointer-types -DTCC_TARGET_PE -DONE_SOURCE
13 13
14ifeq ($(ARCH), 64)14ifeq ($(ARCH), 64)
15NATIVE = -m$(ARCH) -DTCC_TARGET_X86_6415NATIVE = -m$(ARCH) -DTCC_TARGET_X86_64
16PREFIX = x86_6416PREFIX = x86_64
17else17else
18NATIVE = -m$(ARCH) -DTCC_TARGET_I38618NATIVE = -m$(ARCH) -DTCC_TARGET_I386
19PREFIX = i38619PREFIX = i386
20endif20endif
21 21
22TARGET = $(ARCH)22TARGET = $(ARCH)
23 23
24ifeq ($(TARGET), 64)24ifeq ($(TARGET), 64)
25TFLAGS = -m$(TARGET) -DTCC_TARGET_X86_6425TFLAGS = -m$(TARGET) -DTCC_TARGET_X86_64
26TPREFIX = x86_6426TPREFIX = x86_64
27else27else
28TFLAGS = -m$(TARGET) -DTCC_TARGET_I38628TFLAGS = -m$(TARGET) -DTCC_TARGET_I386
29TPREFIX = i38629TPREFIX = i386
30endif30endif
31 31
32all: pre bootstrap libs rebuild32all: pre bootstrap libs rebuild
33 @chmod 775 *.exe33 @chmod 775 *.exe
34 @ls -ls *.exe34 @ls -ls *.exe
35 35
36pre:36pre:
37 @echo "#define TCC_VERSION \"$(VERSION)\"" 1>../config.h37 @echo "#define TCC_VERSION \"$(VERSION)\"" 1>../config.h
38 @echo "#ifdef TCC_TARGET_X86_64" 1>>../config.h38 @echo "#ifdef TCC_TARGET_X86_64" 1>>../config.h
39 @echo "#define CONFIG_TCC_LIBPATHS \"{B}/lib/64;{B}/lib\"" 1>>../config.h39 @echo "#define CONFIG_TCC_LIBPATHS \"{B}/lib/64;{B}/lib\"" 1>>../config.h
40 @echo "#else" 1>>../config.h40 @echo "#else" 1>>../config.h
41 @echo "#define CONFIG_TCC_LIBPATHS \"{B}/lib/32;{B}/lib\"" 1>>../config.h41 @echo "#define CONFIG_TCC_LIBPATHS \"{B}/lib/32;{B}/lib\"" 1>>../config.h
42 @echo "#endif" 1>>../config.h42 @echo "#endif" 1>>../config.h
43 @echo @set VERSION $(VERSION) 1>../config.texi43 @echo @set VERSION $(VERSION) 1>../config.texi
44 @rm -f *tcc.exe tiny_*.exe *tcc.dll44 @rm -f *tcc.exe tiny_*.exe *tcc.dll
45 @rm -r -f libtcc45 @rm -r -f libtcc
46 @rm -r -f libtcc doc lib/32 lib/6446 @rm -r -f libtcc doc lib/32 lib/64
47 @mkdir libtcc47 @mkdir libtcc
48 @mkdir doc48 @mkdir doc
49 @mkdir lib/3249 @mkdir lib/32
50 @mkdir lib/6450 @mkdir lib/64
51 @cp ../include/*.h include51 @cp ../include/*.h include
52 @cp ../tcclib.h include52 @cp ../tcclib.h include
53 @cp ../libtcc.h include53 @cp ../libtcc.h include
54 @cp tcc-win32.txt doc54 @cp tcc-win32.txt doc
55 @cp ../tests/libtcc_test.c examples55 @cp ../tests/libtcc_test.c examples
56 56
57PHONY += pre57PHONY += pre
58 58
59bootstrap:59bootstrap:
60 @echo Bootstrapping 32bits and 64bits tools with $(BOOTCC) -m$(ARCH)60 @echo Bootstrapping 32bits and 64bits tools with $(BOOTCC) -m$(ARCH)
61 @$(BOOTCC) $(CFLAGS) -DTCC_TARGET_I386 -o i386-win32-tcc.exe ../tcc.c61 @$(BOOTCC) $(CFLAGS) -DTCC_TARGET_I386 -o i386-win32-tcc.exe ../tcc.c
62 @$(BOOTCC) $(CFLAGS) -DTCC_TARGET_I386 -o tiny_libmaker32.exe ./tools/tiny_libmaker.c62 @$(BOOTCC) $(CFLAGS) -DTCC_TARGET_I386 -o tiny_libmaker32.exe ./tools/tiny_libmaker.c
63 @$(BOOTCC) $(CFLAGS) -DTCC_TARGET_X86_64 -o x86_64-win32-tcc.exe ../tcc.c63 @$(BOOTCC) $(CFLAGS) -DTCC_TARGET_X86_64 -o x86_64-win32-tcc.exe ../tcc.c
64 @$(BOOTCC) $(CFLAGS) -DTCC_TARGET_X86_64 -o tiny_libmaker64.exe ./tools/tiny_libmaker.c64 @$(BOOTCC) $(CFLAGS) -DTCC_TARGET_X86_64 -o tiny_libmaker64.exe ./tools/tiny_libmaker.c
65 @$(BOOTCC) $(CFLAGS) $(NATIVE) -o tcc.exe ../tcc.c65 @$(BOOTCC) $(CFLAGS) $(NATIVE) -o tcc.exe ../tcc.c
66 @$(BOOTCC) $(CFLAGS) $(NATIVE) -DLIBTCC_AS_DLL -o libtcc.dll -shared ../libtcc.c66 @$(BOOTCC) $(CFLAGS) $(NATIVE) -DLIBTCC_AS_DLL -o libtcc.dll -shared ../libtcc.c
67 67
68PHONY += bootstrap68PHONY += bootstrap
69 69
70lib/32/libtcc1.a: tiny_libmaker32.exe70lib/32/libtcc1.a: tiny_libmaker32.exe
71 @echo Building $*.a with tcc -m3271 @echo Building $*.a with tcc -m32
72 @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c ../lib/libtcc1.c 72 @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c ../lib/libtcc1.c
73 @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c ../lib/alloca86.S 73 @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c ../lib/alloca86.S
74 @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c ../lib/alloca86-bt.S 74 @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c ../lib/alloca86-bt.S
75 @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/crt1.c 75 @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/crt1.c
76 @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/wincrt1.c 76 @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/wincrt1.c
77 @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/dllcrt1.c 77 @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/dllcrt1.c
78 @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/dllmain.c 78 @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/dllmain.c
79 @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/chkstk.S 79 @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/chkstk.S
80 @./tiny_libmaker32 lib/32/libtcc1.a libtcc1.o alloca86.o alloca86-bt.o crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o80 @./tiny_libmaker32 lib/32/libtcc1.a libtcc1.o alloca86.o alloca86-bt.o crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o
81 @rm *.o81 @rm *.o
82 82
83lib/64/libtcc1.a: tiny_libmaker64.exe83lib/64/libtcc1.a: tiny_libmaker64.exe
84 @echo Building $*.a with tcc -m6484 @echo Building $*.a with tcc -m64
85 @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c ../lib/libtcc1.c 85 @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c ../lib/libtcc1.c
86 @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c ../lib/alloca86_64.S 86 @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c ../lib/alloca86_64.S
87 @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c ../lib/alloca86_64-bt.S 87 @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c ../lib/alloca86_64-bt.S
88 @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/crt1.c 88 @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/crt1.c
89 @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/wincrt1.c 89 @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/wincrt1.c
90 @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/dllcrt1.c 90 @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/dllcrt1.c
91 @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/dllmain.c 91 @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/dllmain.c
92 @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/chkstk.S 92 @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/chkstk.S
93 @./tiny_libmaker64 lib/64/libtcc1.a libtcc1.o alloca86_64.o alloca86_64-bt.o crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o93 @./tiny_libmaker64 lib/64/libtcc1.a libtcc1.o alloca86_64.o alloca86_64-bt.o crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o
94 @rm *.o94 @rm *.o
95 95
96libs: lib/32/libtcc1.a lib/64/libtcc1.a96libs: lib/32/libtcc1.a lib/64/libtcc1.a
97 97
98PHONY += libs98PHONY += libs
99 99
100rebuild:100rebuild:
101 @echo Rebuild using tcc itself - default $(TARGET)bits101 @echo Rebuild using tcc itself - default $(TARGET)bits
102 @./$(TPREFIX)-win32-tcc $(TFLAGS) -DTCC_TARGET_PE -DONE_SOURCE -o tcc.exe ../tcc.c102 @./$(TPREFIX)-win32-tcc $(TFLAGS) -DTCC_TARGET_PE -DONE_SOURCE -o tcc.exe ../tcc.c
103 @./$(TPREFIX)-win32-tcc $(TFLAGS) -DTCC_TARGET_PE -DONE_SOURCE -o tiny_libmaker.exe tools/tiny_libmaker.c103 @./$(TPREFIX)-win32-tcc $(TFLAGS) -DTCC_TARGET_PE -DONE_SOURCE -o tiny_libmaker.exe tools/tiny_libmaker.c
104 @./tcc $(TFLAGS) -DTCC_TARGET_PE -DONE_SOURCE -DLIBTCC_AS_DLL -o libtcc.dll -shared ../libtcc.c104 @./$(TPREFIX)-win32-tcc $(TFLAGS) -DTCC_TARGET_PE -DONE_SOURCE -o tiny_impdef.exe tools/tiny_impdef.c
105 @./tcc -m$(TARGET) -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_I386 -o tmp-tcc.exe ../tcc.c && mv tmp-tcc.exe i386-win32-tcc.exe105 @./tcc $(TFLAGS) -DTCC_TARGET_PE -DONE_SOURCE -DLIBTCC_AS_DLL -o libtcc.dll -shared ../libtcc.c
106 @./tcc -m$(TARGET) -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_X86_64 -o tmp-tcc.exe ../tcc.c && mv tmp-tcc.exe x86_64-win32-tcc.exe106 @./tcc -m$(TARGET) -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_I386 -o tmp-tcc.exe ../tcc.c && mv tmp-tcc.exe i386-win32-tcc.exe
107 @./tcc -m$(TARGET) -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_I386 -o tiny_libmaker32.exe tools/tiny_libmaker.c107 @./tcc -m$(TARGET) -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_X86_64 -o tmp-tcc.exe ../tcc.c && mv tmp-tcc.exe x86_64-win32-tcc.exe
108 @./tcc -m$(TARGET) -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_X86_64 -o tiny_libmaker64.exe tools/tiny_libmaker.c108 @./tcc -m$(TARGET) -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_I386 -o tiny_libmaker32.exe tools/tiny_libmaker.c
109 109 @./tcc -m$(TARGET) -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_X86_64 -o tiny_libmaker64.exe tools/tiny_libmaker.c
110PHONY += rebuild110
111 111PHONY += rebuild
112TARNAME = tcc-$(VERSION)-$(PREFIX)-win32112
113 113TARNAME = tcc-$(VERSION)-$(PREFIX)-win32
114tarball:114
115 @rm -r -f $(TARNAME)115tarball:
116 @mkdir $(TARNAME)116 @rm -r -f $(TARNAME)
117 @cp -r doc $(TARNAME)117 @mkdir $(TARNAME)
118 @cp -r examples $(TARNAME)118 @cp -r doc $(TARNAME)
119 @cp -r include $(TARNAME)119 @cp -r examples $(TARNAME)
120 @cp -r lib $(TARNAME)120 @cp -r include $(TARNAME)
121 @cp -r libtcc $(TARNAME)121 @cp -r lib $(TARNAME)
122 @cp -r tools $(TARNAME)122 @cp -r libtcc $(TARNAME)
123 @cp -r build-tcc.bat $(TARNAME)123 @cp -r tools $(TARNAME)
124 @cp -r i386-win32-tcc.exe $(TARNAME)124 @cp -r build-tcc.bat $(TARNAME)
125 @cp -r libtcc.def $(TARNAME)125 @cp -r i386-win32-tcc.exe $(TARNAME)
126 @cp -r libtcc.dll $(TARNAME)126 @cp -r libtcc.def $(TARNAME)
127 @cp -r Makefile $(TARNAME)127 @cp -r libtcc.dll $(TARNAME)
128 @cp -r tcc.exe $(TARNAME)128 @cp -r Makefile $(TARNAME)
129 @cp -r tcc-win32.txt $(TARNAME)129 @cp -r tcc.exe $(TARNAME)
130 @cp -r tiny_libmaker.exe $(TARNAME)130 @cp -r tcc-win32.txt $(TARNAME)
131 @cp -r tiny_libmaker32.exe $(TARNAME)131 @cp -r tiny_impdef.exe $(TARNAME)
132 @cp -r tiny_libmaker64.exe $(TARNAME)132 @cp -r tiny_libmaker.exe $(TARNAME)
133 @cp -r x86_64-win32-tcc.exe $(TARNAME)133 @cp -r tiny_libmaker32.exe $(TARNAME)
134 @tar czf $(TARNAME).tar.gz $(TARNAME)134 @cp -r tiny_libmaker64.exe $(TARNAME)
135 @rm -r -f $(TARNAME)135 @cp -r x86_64-win32-tcc.exe $(TARNAME)
136 136 @tar czf $(TARNAME).tar.gz $(TARNAME)
137PHONY += tarball137 @rm -r -f $(TARNAME)
138 138
139clean:139PHONY += tarball
140 rm -f *.o *.exe *.dll lib/*/*.a *.pdb *.obj *.exp *.def *.lib140
141clean:
142 rm -f *.o *.exe *.dll lib/*/*.a *.pdb *.obj *.exp *.def *.lib

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