Some in-between fixes (See Changelog for details).
[tinycc/kirr.git] / win32 / build-tcc.bat
blob32cb5e15534b51ec43be57cb623c0b248805e102
1 @rem ----------------------------------------------------
2 @rem batch file to build tcc using gcc and ar from mingw
3 @rem ----------------------------------------------------
5 @if exist ..\config.h goto configready
7 @echo>..\config.h #define TCC_VERSION "0.9.24pre"
8 @echo>>..\config.h #define TCC_TARGET_PE 1
9 @echo>>..\config.h #define CONFIG_TCCDIR NULL
11 :configready
13 gcc -Os -fno-strict-aliasing ../tcc.c -o tcc.exe -s
14 gcc -Os -fno-strict-aliasing ../tcc.c -D LIBTCC -c -o libtcc.o
15 gcc -Os -fno-strict-aliasing ../tiny_impdef.c -o tiny_impdef.exe -s
16 mkdir libtcc
17 ar rcs libtcc/libtcc.a libtcc.o
18 del libtcc.o
19 copy ..\libtcc.h libtcc
21 .\tcc -c lib/crt1.c
22 .\tcc -c lib/wincrt1.c
23 .\tcc -c lib/dllcrt1.c
24 .\tcc -c lib/dllmain.c
25 .\tcc -c lib/chkstk.S
26 .\tcc -c ../libtcc1.c
27 .\tcc -c ../alloca86.S
28 .\tcc -c ../alloca86-bt.S
29 ar rcs lib/libtcc1.a crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o libtcc1.o alloca86.o alloca86-bt.o
30 del *.o