blob: 6ddb30135eb3c18f8d42abeb3c80f4e5a2cbca1e (
plain) (
blame)
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
47
48
49
50
51
52
|
@echo off
set location=%cd%
set me="%~dp0"
REM 4cc\code\bin
cd %me%
REM 4cc
cd ..\..
set repo_root=%cd%
set src_root=%repo_root%\code
set build_root=%repo_root%\build
set bin_root=%repo_root%\code\bin
set custom_root=%repo_root%\code\custom
set custom_bin=%custom_root%\bin
call %custom_bin%\setup_cl_x64.bat
cd %location%
set mode=%1
set backend=%1
if "%1%" == "/DWIN32_OPENGL" (
set mode=%2
) else if "%1%" == "/DWIN32_DX11" (
set mode=%2
) else (
set backend=%2
)
if "%backend%" == "" (set backend=/DWIN32_OPENGL)
if "%mode%" == "" (set mode=/DDEV_BUILD)
set opts=/W4 /wd4310 /wd4100 /wd4201 /wd4505 /wd4996 /wd4127 /wd4510 /wd4512 /wd4610 /wd4390 /wd4189 /WX
set opts=%opts% /GR- /EHa- /nologo /FC /Zi
set opts=%opts% /I%src_root% /I%custom_root%
set opts=%opts% %mode% %backend%
set FirstError=0
if not exist "%build_root%" mkdir %build_root%
pushd %build_root%
call cl %opts% kernel32.lib %bin_root%\4ed_build.cpp /Febuild
if %ERRORLEVEL% neq 0 (set FirstError=1)
if %ERRORLEVEL% neq 0 (goto END)
popd
%build_root%\build
:END
if %ERRORLEVEL% neq 0 (set FirstError=1)
|