This commit is contained in:
2024-09-11 22:49:07 +01:00
parent 6e289f79fd
commit 19ae9a2031
6 changed files with 137 additions and 59 deletions

View File

@@ -1,9 +1,9 @@
@echo off
if NOT EXIST .\build mkdir .\build
pushd .\build
cl ^
set commonLinkerFlags= -opt:ref user32.lib Gdi32.lib winmm.lib
set commonCompilerFlags=^
-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 =%^
@@ -12,10 +12,12 @@ cl ^
-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 =%
-Zi %= Generate debugger info =%
pushd .\build
cl %commonCompilerFlags% -Fe:handmade.dll ..\src\handmade.cpp -Fmhandmade.map /link /DLL /EXPORT:gameGetSoundSamples /EXPORT:gameUpdateAndRender
cl %commonCompilerFlags% -Fe:handmade_win32.exe ..\src\win32_handmade.cpp -Fmwin32_handmade.map /link %commonLinkerFlags%
popd
exit /b