Example Makefile For Codesourcery


TheGoodDoktor

Still Fresh
Joined
Sep 6, 2008
Messages
74
Hello Everyone

I was thinking of trying to get some code compiling using CodeSourcery Lite and I was wondering if there was any example makefiles to help me get started.
An example which uses SDL & OpenGL ES would be ideal but I would be happy with something simple just to get me started. Even a 'Hello World' program would be useful.

Thanks in advance.
TheGoodDoktor.
 
You can look up pretty much any project which cross-compiles. Here is a simple example:

CODE

CROSS=arm-none-linux-gnueabi-
CC=$(CROSS)gcc
CFLAGS = -Wall -O2 -I/some_path/include/SDL/

parallax2 : parallax2.o some_other_object.o
$(CC) -O2 $^ -o $@ -L/some_path/lib -lSDL -lpthread
 
Pickle said:
or you can use codeblocks and forget about makefiles
Thanks, I'll give it a go. I haven't used CodeBlocks for a long time but I imagine it will be fairly straightforward to make it use the CodeSourcery command line tools. Has anyone here tried this already?
 
Last edited by a moderator:
OK. I got my project setup in Code Blocks which was very easy so thanks for the advice.
I'm now at the stage where I need to include the GLES headers. I must say I'm a bit stumped now.
Are the GLES headers & libs available for the Pandora or isn't the SDK at that stage yet?
Cheers,
TheGoodDoktor
 
TheGoodDoktor said:
OK. I got my project setup in Code Blocks which was very easy so thanks for the advice.
I'm now at the stage where I need to include the GLES headers. I must say I'm a bit stumped now.
Are the GLES headers & libs available for the Pandora or isn't the SDK at that stage yet?
Cheers,
TheGoodDoktor
I don't think they are available yet... I know I'm still waiting for the SDL libs to become available so I can compile PandoraPanic!
 
Last edited by a moderator:
Back
Top