@echo off
echo Seal S2A Compilator
echo ---------------------
echo http://www.sealsystem.org
echo.
echo NEED DJGPP !
echo.
set FF=apps\games\%1.c
if not exist %FF% goto err
echo Compiling %1.c
echo.
gcc -g -Iinclude/ -c apps\games\%1.c -o obj\apps\%1.o
echo Linking to bin\s2a-bin\%1.s2a
dlxgen.exe %2bin\s2a-bin\%1.s2a obj\apps\%1.o
if exist apps\games\%1.dat dlxinsd bin\s2a-bin\%1.s2a apps\games\%1.dat
echo ...
echo.
echo Finished
goto fin

:err
echo ERROR
echo.
echo Using       : APP [file name without ".C"]
echo Sample      : APP myapp
echo.
:fin
set FF=