@echo off if NOT EXIST .\build mkdir .\build pushd .\build cl ^ -MT %= Make sure the C runtime library is statically linked =%^ -Fmwin32_handmade.map %= Create a map file =%^ -Gm- %= Turns off incremently building =%^ -nologo %= No one cares you made the compiler Microsoft =%^ -Oi %= Always use intrinsics =%^ -EHa- %= Disable exception handling =%^ -GR- %= Never use runtime type info from C++ =%^ -WX -W4 -wd4201 -wd4100 -wd4189 %= Compiler warnings, -WX warnings as errors, -W4 warning level 4, -wdXXXX disable warning XXXX =%^ -DHANDMADE_INTERNAL=1 -DHANDMADE_SLOW=1 -DHANDMADE_WIN32=1 %= Custom #defines =%^ -FC %= Full path of source code file in diagnostics =%^ -Zi %= Generate debugger info =%^ -Fe:handmade.exe ..\src\win32_handmade.cpp %= Output filename, input filename =%^ user32.lib Gdi32.lib winmm.lib %= Linked libraries =%^ /link -subsystem:windows,5.1 %= Linker stuff =% popd exit /b :error echo Failed with error #%errorlevel%. exit /b %errorlevel%