cd %~dp0

REM Live++: replace the path to MSVC and the Windows SDK if necessary
set pathToMSVC=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133
set pathToWindowsSDK=C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0
set objDir=temp\x64_Debug_09_ClangLLD
set binDir=bin\x64

set libDir=/LIBPATH:"%pathToMSVC%\lib\x64" /LIBPATH:"%pathToWindowsSDK%\ucrt\x64" /LIBPATH:"%pathToWindowsSDK%\um\x64"
set cmdLine=/ERRORREPORT:PROMPT /OUT:%binDir%\09_ClangLLD_Debug.exe /INCREMENTAL:NO /NOLOGO /FUNCTIONPADMIN /MANIFEST "/MANIFESTUAC:level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG:FULL /PDB:%binDir%\09_ClangLLD_Debug.pdb /SUBSYSTEM:CONSOLE /OPT:NOREF /OPT:NOICF /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X64 %libDir%

set LLD=LLVM\lld-link.exe

mkdir %binDir%

%LLD% %cmdLine% %objDir%\Cube.obj %objDir%\FireDemo.obj %objDir%\FrameBuffer.obj %objDir%\Input.obj %objDir%\MainClangLLD.obj %objDir%\MainLoop.obj %objDir%\Matrix4x4.obj %objDir%\Mutex.obj %objDir%\Palette.obj %objDir%\PalettizedFrameBuffer.obj %objDir%\Timestamp.obj %objDir%\Window.obj %objDir%\XorShift.obj User32.lib Gdi32.lib
