Unified · Split
| @@ -65,42 +65,40 @@ PHONY += pre · 64 unmodified lines | ||
| 65 | 65 | bootstrap: |
| 66 | 66 | @echo Bootstrapping 32bits and 64bits tools with $(BOOTCC) -m$(CPU) |
| 67 | 67 | @$(BOOTCC) $(CFLAGS) -DTCC_TARGET_I386 -o i386-win32-tcc.exe ../tcc.c |
| 68 | − @$(BOOTCC) $(CFLAGS) -DTCC_TARGET_I386 -o tiny_libmaker-m32.exe ./tools/tiny_libmaker.c | |
| 69 | 68 | @$(BOOTCC) $(CFLAGS) -DTCC_TARGET_X86_64 -o x86_64-win32-tcc.exe ../tcc.c |
| 70 | − @$(BOOTCC) $(CFLAGS) -DTCC_TARGET_X86_64 -o tiny_libmaker-m64.exe ./tools/tiny_libmaker.c | |
| 71 | 69 | @$(BOOTCC) $(CFLAGS) $(NATIVE) -o tcc.exe ../tcc.c |
| 72 | 70 | @$(BOOTCC) $(CFLAGS) $(NATIVE) -DLIBTCC_AS_DLL -o libtcc.dll -shared ../libtcc.c |
| 73 | 71 | |
| 74 | 72 | PHONY += bootstrap |
| 75 | 73 | |
| 76 | −lib/32/libtcc1.a: tiny_libmaker-m32.exe | |
| 74 | +lib/32/libtcc1.a: | |
| 77 | 75 | @echo Building $*.a with tcc -m32 |
| 78 | 76 | @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c ../lib/libtcc1.c |
| 79 | 77 | @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c ../lib/alloca86.S |
| 80 | 78 | @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c ../lib/alloca86-bt.S |
| 81 | 79 | @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/crt1.c |
| 82 | − @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -D_UNICODE -DUNICODE -c lib/crt1.c -o crt1_w.o | |
| 80 | + @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/crt1w.c | |
| 83 | 81 | @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/wincrt1.c |
| 84 | − @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -D_UNICODE -DUNICODE -c lib/wincrt1.c -o wincrt1_w.o | |
| 82 | + @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/wincrt1w.c | |
| 85 | 83 | @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/dllcrt1.c |
| 86 | 84 | @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/dllmain.c |
| 87 | 85 | @./tcc -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -c lib/chkstk.S |
| 88 | − @./tiny_libmaker-m32 lib/32/libtcc1.a libtcc1.o alloca86.o alloca86-bt.o crt1.o wincrt1.o crt1_w.o wincrt1_w.o dllcrt1.o dllmain.o chkstk.o | |
| 86 | + @./tcc -m32 -ar lib/32/libtcc1.a libtcc1.o alloca86.o alloca86-bt.o crt1.o wincrt1.o crt1w.o wincrt1w.o dllcrt1.o dllmain.o chkstk.o | |
| 89 | 87 | @rm *.o |
| 90 | 88 | |
| 91 | −lib/64/libtcc1.a: tiny_libmaker-m64.exe | |
| 89 | +lib/64/libtcc1.a: | |
| 92 | 90 | @echo Building $*.a with tcc -m64 |
| 93 | 91 | @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c ../lib/libtcc1.c |
| 94 | 92 | @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c ../lib/alloca86_64.S |
| 95 | 93 | @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c ../lib/alloca86_64-bt.S |
| 96 | 94 | @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/crt1.c |
| 97 | − @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -D_UNICODE -DUNICODE -c lib/crt1.c -o crt1_w.o | |
| 95 | + @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/crt1w.c | |
| 98 | 96 | @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/wincrt1.c |
| 99 | − @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -D_UNICODE -DUNICODE -c lib/wincrt1.c -o wincrt1_w.o | |
| 97 | + @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/wincrt1w.c | |
| 100 | 98 | @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/dllcrt1.c |
| 101 | 99 | @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/dllmain.c |
| 102 | 100 | @./tcc -m64 -DTCC_TARGET_PE -DTCC_TARGET_X86_64 -c lib/chkstk.S |
| 103 | − @./tiny_libmaker-m64 lib/64/libtcc1.a libtcc1.o alloca86_64.o alloca86_64-bt.o crt1.o wincrt1.o crt1_w.o wincrt1_w.o dllcrt1.o dllmain.o chkstk.o | |
| 101 | + @./tcc -m64 -ar lib/64/libtcc1.a libtcc1.o alloca86_64.o alloca86_64-bt.o crt1.o wincrt1.o crt1w.o wincrt1w.o dllcrt1.o dllmain.o chkstk.o | |
| 104 | 102 | @rm *.o |
| 105 | 103 | |
| 106 | 104 | libs: lib/32/libtcc1.a lib/64/libtcc1.a |
| @@ -110,13 +108,9 @@ PHONY += libs · 3 unmodified lines | ||
| 110 | 108 | rebuild: |
| 111 | 109 | @echo Rebuild using tcc itself - default $(TARGET)bits |
| 112 | 110 | @./$(TARCH)-win32-tcc $(TFLAGS) -DTCC_TARGET_PE -DONE_SOURCE -o tcc.exe ../tcc.c |
| 113 | − @./$(TARCH)-win32-tcc $(TFLAGS) -DTCC_TARGET_PE -DONE_SOURCE -o tiny_libmaker.exe tools/tiny_libmaker.c | |
| 114 | − @./$(TARCH)-win32-tcc $(TFLAGS) -DTCC_TARGET_PE -DONE_SOURCE -o tiny_impdef.exe tools/tiny_impdef.c | |
| 115 | 111 | @./tcc $(TFLAGS) -DTCC_TARGET_PE -DONE_SOURCE -DLIBTCC_AS_DLL -o libtcc.dll -shared ../libtcc.c |
| 116 | 112 | @./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 |
| 117 | 113 | @./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 |
| 118 | − @./tcc -m$(TARGET) -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_I386 -o tiny_libmaker-m32.exe tools/tiny_libmaker.c | |
| 119 | − @./tcc -m$(TARGET) -DTCC_TARGET_PE -DONE_SOURCE -DTCC_TARGET_X86_64 -o tiny_libmaker-m64.exe tools/tiny_libmaker.c | |
| 120 | 114 | |
| 121 | 115 | PHONY += rebuild |
| 122 | 116 | |
| @@ -143,10 +137,6 @@ tarball: · 20 unmodified lines | ||
| 143 | 137 | @cp -r Makefile $(TARNAME) |
| 144 | 138 | @cp -r tcc.exe $(TARNAME) |
| 145 | 139 | @cp -r tcc-win32.txt $(TARNAME) |
| 146 | − @cp -r tiny_impdef.exe $(TARNAME) | |
| 147 | − @cp -r tiny_libmaker.exe $(TARNAME) | |
| 148 | − @cp -r tiny_libmaker-m32.exe $(TARNAME) | |
| 149 | − @cp -r tiny_libmaker-m64.exe $(TARNAME) | |
| 150 | 140 | @cp -r x86_64-win32-tcc.exe $(TARNAME) |
| 151 | 141 | @tar czf $(TARNAME).tar.gz $(TARNAME) |
| 152 | 142 | @rm -r -f $(TARNAME) |