58 lines
1.1 KiB
Batchfile
58 lines
1.1 KiB
Batchfile
@echo off
|
|
setlocal enabledelayedexpansion
|
|
cd /D "%~dp0"
|
|
if not exist build mkdir build
|
|
pushd build
|
|
|
|
::::::::::::::::::::::::::::::::
|
|
::~ Unpack args
|
|
|
|
for %%a in (%*) do set "%%a=1"
|
|
|
|
if "%~1" == "" (
|
|
echo [No arguments provided, assuming default `pp` build]
|
|
set meta=1
|
|
set pp=1
|
|
)
|
|
|
|
if "%~1" == "release" if "%~2" == "" (
|
|
echo [No arguments provided, assuming default 'pp' build]
|
|
set meta=1
|
|
set pp=1
|
|
)
|
|
|
|
if not "%release%" == "1" set debug=1
|
|
|
|
if "%release%" == "1" echo [Release]
|
|
if "%debug%" == "1" echo [Debug]
|
|
|
|
::::::::::::::::::::::::::::::::
|
|
::~ Build meta program
|
|
|
|
if "%meta%" == "1" (
|
|
echo [Building meta]
|
|
|
|
"cl" ../src/meta/meta.c /Od /Z7 /nologo /link /DEBUG:FULL /INCREMENTAL:NO
|
|
|
|
if not "!errorlevel!" == "0" (
|
|
echo .
|
|
echo Failed to build meta program
|
|
exit /b 1
|
|
)
|
|
)
|
|
|
|
::::::::::::::::::::::::::::::::
|
|
::~ Build power play
|
|
|
|
if "%pp%" == "1" (
|
|
echo [Building power play]
|
|
|
|
"meta.exe" pp
|
|
|
|
if not "!errorlevel!" == "0" (
|
|
echo.
|
|
echo Failed to run meta program
|
|
exit /b 1
|
|
)
|
|
)
|