-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
47 lines (35 loc) · 1.36 KB
/
build.bat
File metadata and controls
47 lines (35 loc) · 1.36 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
@echo off
set code=%cd%
set application_name=Lith
set build_options= -DBUILD_WIN32=1
set warnings= /W4 /WX /wd4201 /wd4100 /wd4127 /wd4505 /wd4533
set compile_flags= -FC -GR- -EHa- -nologo -Zi %warnings% /I "%code%/code/"
set common_link_flags= opengl32.lib -incremental:no
set platform_link_flags= Ws2_32.lib gdi32.lib user32.lib Kernel32.lib winmm.lib %common_link_flags%
set app_link_flags= /LIBPATH:"%code%/code/third_party" %common_link_flags%
if not exist build mkdir build
pushd build
del %application_name%_*.pdb > NUL 2> NUL
set time_stamp=%date:~-4,4%%date:~-10,2%%date:~-7,2%_%time:~0,2%%time:~3,2%%time:~6,2%
start /b /wait "" "cl.exe" %build_options% %compile_flags% ../code/game/game_main.cpp /LD /link %app_link_flags% /out:%application_name%_code.dll -PDB:%application_name%_%time_stamp: =%.pdb
start /b /wait "" "cl.exe" %build_options% %compile_flags% ../code/os/win32/win32_main.cpp /link %platform_link_flags% /out:%application_name%.exe
if not exist game1 (
mkdir game1
cp -r ..\data game1
)
if not exist game2 (
mkdir game2
cp -r ..\data game2
)
if not exist game3 (
mkdir game3
cp -r ..\data game3
)
if not exist game4 (
mkdir game4
cp -r ..\data game4
)
cp %application_name%_code.dll %application_name%.exe game1
cp %application_name%_code.dll %application_name%.exe game2
cp %application_name%_code.dll %application_name%.exe game3
popd