#!/bin/sh -

#
# VS 2019 build script
#

#source vs2019.env

cl -nologo -MD -W3 -O1 gen_cvs.c

cl -nologo -MD -W3 -O2 -EHsc test_hans.cpp

cl -nologo -MD -W3 -O2 test_foobar2.c
#cl -nologo -W3 -O2 test_foobar3.c memcpy64.obj strcmp64.obj strlen64.obj -link -map

#x86_64-w64-mingw32-gcc.exe -O2 -o test_foobar2_mingw.exe test_foobar2.c

cl -nologo -MD -W3 -O2 test_foobar3.c
#cl -nologo -W3 -O2 test_foobar3.c memcpy64.obj strcmp64.obj strlen64.obj -link -map

cl -nologo -MD -W3 -O2 -std:c++17 -EHsc test_heinzel.cpp

cl -nologo -MD -W3 -O2 -std:c++17 -EHsc test_heinzel2.cpp

#x86_64-w64-mingw32-g++.exe -std=c++17 -O2 -o test_heinzel2_mingw.exe test_heinzel2.cpp

#cl -nologo -W3 -O2 test_win_native.c memcpy64.obj strcmp64.obj strlen64.obj

cl -nologo -W3 -O2 -GA -GL -Zl -GS- test_win_native.c memcpy64.obj strlen64.obj strcmp64.obj -link -release -nodefaultlib -entry:xmain -subsystem:console -merge:.rdata=.text -map kernel32.lib

size test*.exe
