Didj and Explorer libSDL

From eLinux.org
Revision as of 04:56, 18 July 2010 by Ay (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

To build SDL, first download and unpack it:

 wget http://www.libsdl.org/release/SDL-1.2.13.tar.gz
 tar -xf SDL-1.2.13.tar.gz
 cd SDL-1.2.13

Now try the following, but replace the "/path/to" lines with paths on your system. You'll want to tell the build system where to install libSDL and where to look for kernel headers:

 CFLAGS="-I/path/to/kernel/linux-2.6/include/" CC=arm-linux-uclibcgnueabi-gcc CXX=arm-linux-uclibcgnueabi-g++ ./configure --prefix=/path/to/rootfs//usr/ --build=`uname -m` --host=arm-linux --disable-video-opengl --disable-video-x11 --disable-esd --disable-video-directfb --enable-video-fbcon

If that succeeds, try building and installing:

 make
 make install

You should see libSDL.so in usr/lib in your rootfs directory as well as its header files in "usr/include". When building applications against libSDL, tell the compiler to look for headers and the linker to look for libraries there (ie: CFLAGS="-I/path/to/rootfs/usr/include" and LDFLAGS="-L/path/to/rootfs/usr/lib").