c-scripting/build_with_cl.bat

21 lines
477 B
Batchfile

@echo off
set code=%cd%
set opts=-FC -GR- -EHa- -nologo -Zi -std:c11 -wd5105
set linkopts=-link -INCREMENTAL:NO
set inc=-I%code%\symbol_set
if not exist "build" ( mkdir build )
pushd build
if "%1" == "" (
cl -Feexample1 %code%\examples\example1.c %opts% %inc% %linkopts%
)
if "%1" == "stack_machine" (
cl -Festack_machine %code%\examples\stack_machine.c %opts% %inc% %linkopts%
)
if "%1" == "hooks" (
cl -Fehooks %code%\examples\hooks.c %opts% %inc% %linkopts%
)
popd