aboutsummaryrefslogtreecommitdiff
path: root/build.bat
diff options
context:
space:
mode:
Diffstat (limited to 'build.bat')
-rw-r--r--build.bat25
1 files changed, 25 insertions, 0 deletions
diff --git a/build.bat b/build.bat
new file mode 100644
index 0000000..d969bee
--- /dev/null
+++ b/build.bat
@@ -0,0 +1,25 @@
+@echo off
+setlocal
+
+pushd %~dp0
+del /q .\build\*
+mkdir .\build
+pushd .\build
+
+set OUTPUTEXE=out.exe
+set OUTPUTPDB=out.pdb
+set INSTALLDIR=..\bin
+
+set SRC="../src/creature.cc" "../src/main.cc"
+cl -W3 -WX -Zi -we4244 -we4456 -we4457 -wd4996 -std:c++14 -utf-8 -MP8 -DBUILD_DEBUG=1 -DARCH_X64=1 -D_CRT_SECURE_NO_WARNINGS=1 -Fe:"%OUTPUTEXE%" -Fd:"%OUTPUTPDB%" %* %SRC% /link -subsystem:console -incremental:no -opt:ref -dynamicbase "ws2_32.lib"
+
+if errorlevel 1 exit /b errorlevel
+
+mkdir "%INSTALLDIR%"
+copy /Y "%OUTPUTEXE%" "%INSTALLDIR%"
+copy /Y "%OUTPUTPDB%" "%INSTALLDIR%"
+
+popd
+popd
+
+endlocal