@echo off
set path=c:\bc.31\bin;%path%
if not exist bin mkdir bin
if exist noctis.sym del noctis.sym
copy supports.nct ..\data /y
rem flying_lander 01
rem multiplayer 02
rem temperature 04

:compile00
cd bin
del *.* /q
cd ..
if exist bin\noctis.exe del bin\noctis.exe
make -fnoctis.mak -B
if exist bin\noctis.exe goto compile01
goto failure

:compile01
copy bin\noctis.exe ..\modules\noctis00.exe /y

cd bin
del *.* /q
cd ..
if exist bin\noctis.exe del bin\noctis.exe
make -fnoctis.mak -DFLYING_LANDER=DEF_FLYING_LANDER -B
if exist bin\noctis.exe goto compile02
goto failure

:compile02
copy bin\noctis.exe ..\modules\noctis01.exe /y

cd bin
del *.* /q
cd ..
if exist bin\noctis.exe del bin\noctis.exe
make -fnoctis.mak -DMULTIPLAYER=DEF_MULTIPLAYER -B
if exist bin\noctis.exe goto compile03
goto failure

:compile03
copy bin\noctis.exe ..\modules\noctis02.exe /y

cd bin
del *.* /q
cd ..
if exist bin\noctis.exe del bin\noctis.exe
make -fnoctis.mak -DFLYING_LANDER=DEF_FLYING_LANDER -DMULTIPLAYER=DEF_MULTIPLAYER -B
if exist bin\noctis.exe goto compile04
goto failure

:compile04
copy bin\noctis.exe ..\modules\noctis03.exe /y

cd bin
del *.* /q
cd ..
if exist bin\noctis.exe del bin\noctis.exe
make -fnoctis.mak -DTEMPERATURE=DEF_TEMPERATURE -B
if exist bin\noctis.exe goto compile05
goto failure

:compile05
copy bin\noctis.exe ..\modules\noctis04.exe /y

cd bin
del *.* /q
cd ..
if exist bin\noctis.exe del bin\noctis.exe
make -fnoctis.mak -DTEMPERATURE=DEF_TEMPERATURE -DFLYING_LANDER=DEF_FLYING_LANDER -B
if exist bin\noctis.exe goto compile06
goto failure

:compile06
copy bin\noctis.exe ..\modules\noctis05.exe /y

cd bin
del *.* /q
cd ..
if exist bin\noctis.exe del bin\noctis.exe
make -fnoctis.mak -DTEMPERATURE=DEF_TEMPERATURE -DMULTIPLAYER=DEF_MULTIPLAYER -B
if exist bin\noctis.exe goto compile07
goto failure

:compile07
copy bin\noctis.exe ..\modules\noctis06.exe /y

cd bin
del *.* /q
cd ..
if exist bin\noctis.exe del bin\noctis.exe
make -fnoctis.mak -DTEMPERATURE=DEF_TEMPERATURE -DFLYING_LANDER=DEF_FLYING_LANDER -DMULTIPLAYER=DEF_MULTIPLAYER -B
if exist bin\noctis.exe goto compile08
goto failure

:compile08
copy bin\noctis.exe ..\modules\noctis07.exe /y

goto success

goto done

:failure
echo Failure!
pause
goto done
:success
pause
:done
if exist noctis.sym del noctis.sym
