@echo off
set BUILD=%1
set TARGET=%2
set RELEASESTATE=%3
set AP_LIBS=12
set GCC_VERSION=13.2.0

if %AP_LIBS%==8 SET GCC_VERSION=7.2.0

set PATH=%T%\app-platform-buildtls;C:\windows\system32;%T%\arm-%GCC_VERSION%-linux-gnu\bin;%T%\x86_64-%GCC_VERSION%-linux-gnu\bin;%T%\aarch64-%GCC_VERSION%-linux-gnu\bin;

make -j %NUMBER_OF_PROCESSORS% -f signaling/main.mak arm BUILD=%BUILD% RELEASESTATE=%RELEASESTATE% AP_LIBS=%AP_LIBS% GCC_VERSION=%GCC_VERSION%
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%

make -j %NUMBER_OF_PROCESSORS% -f signaling/main.mak x86_64 BUILD=%BUILD% RELEASESTATE=%RELEASESTATE% AP_LIBS=%AP_LIBS% GCC_VERSION=%GCC_VERSION%
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%

make -j %NUMBER_OF_PROCESSORS% -f signaling/main.mak arm64 BUILD=%BUILD% RELEASESTATE=%RELEASESTATE% AP_LIBS=%AP_LIBS% GCC_VERSION=%GCC_VERSION%
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%