@echo off

cd .\allegro
make
cd .\lib\djgpp
if not exist liballeg.a goto allegerror
copy liballeg.a ..\..\.. > nul
cd ..\..\..

echo.
echo.
echo COMPILATION FOR ALLEGRO IS SUCCESSFULL !!!!
echo.
echo.


cd .\mikm210\source
make
gcc -I -Isrc -s makelib.c -o makelib.exe

echo.
echo.
makelib.exe
echo.
cd ..\..
if not exist libmik.a goto mikerror

echo.
echo.
echo COMPILATION FOR MIKMOD IS SUCCESSFUL !!!!
echo.
echo.


echo Compiling TEST.C
gcc -I -Isrc -s -O3 test.c liballeg.a libmik.a -o test.exe

echo Testing mikalleg
echo Press any key to exit the test
test.exe

Echo.
Echo.
Echo DONE !!!
Echo Please Read readme.txt
Echo. 



goto ext


rem -------------------------------------------------------------------------

:mikerror
echo Error making the mikmod library !!!
goto ext

:allegerror
echo Error making the allegro library !!!
goto ext

:ext




