dll build + small adjustments

This commit is contained in:
Gabriel Corneanu 2011-08-10 12:42:14 +02:00
parent e844fb11c2
commit fd0cea8895

View File

@ -10,7 +10,7 @@ echo>>..\config.h #define CONFIG_SYSROOT ""
@if _%PROCESSOR_ARCHITECTURE%_==_AMD64_ goto x86_64 @if _%PROCESSOR_ARCHITECTURE%_==_AMD64_ goto x86_64
@set target=-DTCC_TARGET_PE -DTCC_TARGET_I386 @set target=-DTCC_TARGET_PE -DTCC_TARGET_I386
@set CC=gcc -Os -s @set CC=gcc -Os -s -fno-strict-aliasing
@set AR=ar @set AR=ar
@set P=32 @set P=32
@goto tools @goto tools
@ -18,7 +18,7 @@ echo>>..\config.h #define CONFIG_SYSROOT ""
:x86_64 :x86_64
@set target=-DTCC_TARGET_PE -DTCC_TARGET_X86_64 @set target=-DTCC_TARGET_PE -DTCC_TARGET_X86_64
@rem mingw 64 has an ICE with -Os @rem mingw 64 has an ICE with -Os
@set CC=x86_64-pc-mingw32-gcc -O0 -s @set CC=x86_64-pc-mingw32-gcc -O0 -s -fno-strict-aliasing
@set AR=x86_64-pc-mingw32-ar @set AR=x86_64-pc-mingw32-ar
@set P=64 @set P=64
@ -29,11 +29,12 @@ echo>>..\config.h #define CONFIG_SYSROOT ""
:libtcc :libtcc
if not exist libtcc\nul mkdir libtcc if not exist libtcc\nul mkdir libtcc
copy ..\libtcc.h libtcc\libtcc.h copy ..\libtcc.h libtcc\libtcc.h
%CC% %target% -fno-strict-aliasing -DONE_SOURCE ../libtcc.c -c -o libtcc.o %CC% %target% -DONE_SOURCE ../libtcc.c -c -o libtcc.o
%AR% rcs libtcc/libtcc.a libtcc.o %AR% rcs libtcc/libtcc.a libtcc.o
%CC% %target% -shared -DLIBTCC_AS_DLL -DONE_SOURCE ../libtcc.c -o libtcc/libtcc.dll
:tcc :tcc
%CC% %target% -fno-strict-aliasing ../tcc.c -o tcc.exe -ltcc -Llibtcc %CC% %target% ../tcc.c -o tcc.exe -ltcc -Llibtcc
:copy_std_includes :copy_std_includes
copy ..\include\*.h include copy ..\include\*.h include