-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.bat
34 lines (23 loc) · 912 Bytes
/
build.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@echo off
setlocal
cd %~dp0
if not exist build mkdir build
cd build
if "%Platform%" neq "x64" (
echo ERROR: Platform is not "x64" - please run this from the MSVC x64 native tools command prompt.
goto end
)
set "common_compile_options= /nologo /W3"
set "common_link_options= /incremental:no /opt:ref /subsystem:console libvcruntime.lib"
set "compile_options=%common_compile_options% /Od /Zo /Z7 /RTC1 /MTd"
set "link_options=%common_link_options% libucrtd.lib libvcruntimed.lib"
if "%1" neq "" goto invalid_arguments
cl %compile_options% ..\src\disassemble.c /link %link_options% /pdb:disassemble.pdb /out:disassemble.exe
cl %compile_options% ..\src\execute.c /link %link_options% /pdb:execute.pdb /out:execute.exe
cl %compile_options% ..\src\estimate.c /link %link_options% /pdb:estimate.pdb /out:estimate.exe
goto end
:invalid_arguments
echo Invalid arguments^. Usage: build
goto end
:end
endlocal