@echo off
echo Seal Xdl Compilator
echo ---------------------
echo http://www.sealsystem.org
echo.
echo NECESSITE DJCPP ! - NEED DJCPP !
echo.
set FF=apps\%1.c
if not exist %FF% goto err
echo Compiling apps\%1.c
echo.
gcc -g -Iinclude/ -c apps\%1.c -o obj\apps\%1.o
echo Linking to bin\%1.xdl
dlxgen.exe %2bin\%1.xdl obj\apps\%1.o
echo ...
del obj\apps\%1.o
echo.
echo Finished
goto fin

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