anton_render/build.bat
2025-05-17 21:45:29 +02:00

63 lines
1.1 KiB
Batchfile

@echo off
echo --- Metagen
@rem ---------------------------------------------------------------------------------------
@rem Build and run codegen
IF NOT EXIST .\build mkdir .\build
pushd .\build
ctime -begin timeBuild.ctm
cl /Zi /nologo ../src/metagen/codegen.c
set LastError=%ERRORLEVEL%
ctime -end timeBuild.ctm %LastError%
popd
echo --- Codegen:
IF NOT %LastError%==0 GOTO :end
ctime -begin timeBuild.ctm
pushd src
pushd gen_test
..\..\build\codegen.exe ./
popd
pushd os
..\..\build\codegen.exe ./
popd
popd
echo Codegen time:
set LastError=%ERRORLEVEL%
ctime -end timeBuild.ctm %LastError%
echo --- Main
@rem ---------------------------------------------------------------------------------------
@rem Build main program
set CommonCompilerFlags=/nologo /Zi /FC /Od /wd4042
@rem /WX /W4 /wd4201 /wd4100 /wd4189 /wd4244 /wd4127 /wd4456
@rem
@rem
IF NOT EXIST .\build mkdir .\build
pushd .\build
ctime -begin timeBuild.ctm
cl %CommonCompilerFlags% ../src/main.c /Fe:program.exe
set LastError=%ERRORLEVEL%
ctime -end timeBuild.ctm %LastError%
popd
IF NOT %LastError%==0 GOTO :end
:end
echo ---