Fixed Makefile
[kball.git] / fix.bat
blob98628e24c8c9f6ead3cb93bf02ab01092b2727a4
1 @echo off\r
2 \r
3 echo KBall Source Code\r
4 echo.\r
5 echo KBall's website: http://kball.sf.net/\r
6 \r
7 \r
8 if [%1] == [linux]   goto linux\r
9 if [%1] == [djgpp]   goto djgpp\r
10 if [%1] == [mingw32] goto mingw32\r
11 if [%1] == [test] goto test\r
12 goto help\r
15 :test\r
16 REM Does a test to see if the platform can compile\r
17 REM You first need to configure the platform\r
18 if exist target.os goto targetok\r
19     echo Before testing, you first must configure your platform.\r
20 goto help\r
22 :targetok\r
23 echo Testing, please wait...\r
24 make test\r
25 if not errorlevel 0 goto testfail\r
26 if not exist test.run goto testfail\r
28     echo.\r
29     echo * SUCESS *\r
30     echo Congratulations, the test compiled!\r
31     echo.\r
32         echo NOTE: You need Allegro 4.1.15 or better to compile KBall\r
34 goto testdone\r
36 :testfail\r
37     echo.\r
38     echo * ERROR *\r
39     echo.\r
40     echo The compilation returned a error!\r
41     echo Check that:\r
42     echo (*) You have all compiler tools installed (gcc,make,etc...)\r
43     echo (*) You have Allegro 4.1.15 or better properly installed (http://alleg.sf.net/)\r
44         echo (*) You have DUMB 0.9.2 or better properly installed (http://dumb.sf.net/)\r
45         echo.\r
47 :testdone\r
48     echo Cleaning the test...\r
49     make cleantest\r
50     \r
51 goto done\r
53 :djgpp\r
54 echo Configuring for DOS/djgpp...\r
55 echo # Warning! This file will be overwritten by configuration routines! > target.os\r
56 echo TARGET=DJGPP>> target.os\r
57 goto done\r
60 :mingw32\r
61 echo Configuring for Windows/Mingw32...\r
62 echo # Warning! This file will be overwritten by configuration routines! > target.os\r
63 echo TARGET=MINGW32>> target.os\r
64 goto done\r
67 :linux\r
68 echo Configuring for Linux/GCC...\r
69 echo # Warning! This file will be overwritten by configuration routines! > target.os\r
70 echo TARGET=LINUX>> target.os\r
71 goto done\r
74 :help\r
75 echo Usage: fix platform\r
76 echo.\r
77 echo Where platform is one of: djgpp, mingw32 or linux. \r
78 echo.\r
79 echo NOTICE:\r
80 echo You can also call: fix test\r
81 echo to check if your system can compile this programs.\r
82 echo.\r
83 echo To compile KBall you need Allegro 4.1.15 or better, and DUMB 0.9.2 or better\r
84 echo http://alleg.sf.net/\r
85 echo http://dumb.sf.net/\r
86 echo.\r
87 goto end\r
89 :done\r
90 echo Done!\r
92 :end\r