Initial commit: basic port of SwarmDS.
[swarmPDK.git] / buildit.cmd
1 @echo off
2 @rem Set the device you want to build for to 1
3 @rem Use Pixi to allow running on either device
4 set PRE=0
5 set PIXI=1
6 set DEBUG=1
7
8 @rem List your source files here
9 set SRC=src\swarm.cpp src\Pixel.cpp
10
11 @rem List the libraries needed
12 set LIBS=-lSDL -lpdl -lGLES_CM
13
14 @rem Name your output executable
15 set OUTFILE=swarm
16
17 if %PRE% equ 0 if %PIXI% equ 0 goto :END
18
19 if %DEBUG% equ 1 (
20    set DEVICEOPTS=-g
21 ) else (
22    set DEVICEOPTS=
23 )
24
25 if %PRE% equ 1 (
26    set DEVICEOPTS=%DEVICEOPTS% -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp
27 )
28
29 if %PIXI% equ 1 (
30    set DEVICEOPTS=%DEVICEOPTS% -mcpu=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp
31 )
32
33 echo %DEVICEOPTS%
34
35 arm-none-linux-gnueabi-gcc %DEVICEOPTS% -o %OUTFILE% %SRC% "-I%PALMPDK%\include" "-I%PALMPDK%\include\SDL" "-L%PALMPDK%\device\lib" -Wl,--allow-shlib-undefined %LIBS%
36
37 goto :EOF
38
39 :END
40 echo Please select the target device by editing the PRE/PIXI variable in this file.
41 exit /b 1
42