anchor.diff: +@echo off
   @rem ----------------------------------------------------
   @rem batch file to build tcc using mingw gcc
   @rem ----------------------------------------------------
  
positive.code: %CC% %target% ../tcc.c -o tcc.exe -ltcc -Llibtcc
  
  :copy_std_includes
  copy ..\include\*.h include
  
  :libtcc1.a
  .\tcc %target% -c ../lib/libtcc1.c
  
negative.code: @set /p VERSION= < ..\VERSION
  echo>..\config.h #define TCC_VERSION "%VERSION%"
  
  @if _%1_==_AMD64_ shift /1 && goto x86_64
  @if _%1_==_x64_ shift /1 && goto x86_64
  
  @set target=-DTCC_TARGET_PE -DTCC_TARGET_I386
  @set CC=gcc -Os -s -fno-strict-aliasing
  @if _%1_==_debug_ set CC=gcc -g -ggdb
  @set P=32
  @goto tools
  
  :x86_64
  @set target=-DTCC_TARGET_PE -DTCC_TARGET_X86_64
  @set CC=x86_64-w64-mingw32-gcc -Os -s -fno-strict-aliasing
  @if _%1_==_debug_ set CC=x86_64-w64-mingw32-gcc -g -ggdb
  @set P=64
  @goto tools
  
  :tools
  echo will use %CC% %target%
  %CC% %target% tools/tiny_impdef.c -o tiny_impdef.exe
  %CC% %target% tools/tiny_libmaker.c -o tiny_libmaker.exe
  
  :libtcc
  if not exist libtcc mkdir libtcc
  copy ..\libtcc.h libtcc\libtcc.h > nul
  %CC% %target% -shared -DLIBTCC_AS_DLL -DONE_SOURCE ../libtcc.c -o libtcc.dll -Wl,-out-implib,libtcc/libtcc.a
  tiny_impdef libtcc.dll -o libtcc/libtcc.def
  
  