Development:Tutorials:SDLRecompile

From DingooWiki

Jump to: navigation, search

Contents

[edit] Preliminar

You need the last toolchain downloaded from dingoo-linux site.

This examples using /opt/mipsel-linux-uclibc as your toolchain directory if you use another path change the prefixes.

An example env-bash script:

#!/bin/sh

export DEVKITGOO="/opt/mipsel-linux-uclibc/usr"
export PATH=$DEVKITGOO/bin:$PATH
exec $SHELL

[edit] SDL

[edit] Compile Flags

SDL-1.2.13$ ./configure --prefix=/opt/mipsel-linux-uclibc/usr --target=mipsel-linux --host=mipsel-linux --enable-shared --enable-static \
--enable-joystick --disable-cdrom --disable-cpuinfo --enable-oss --disable-alsatest --disable-esd --disable-pulseaudio --disable-arts \
--disable-nas --disable-diskaudio --disable-dummyaudio --disable-mintaudio --disable-video-nanox --disable-video-x11 --enable-video-fbcon \
--disable-video-directfb --disable-input-tslib --disable-pth --enable-clock_gettime --without-x 

[edit] Patches

diff -rupN a/configure b/configure
--- a/configure	2007-12-31 06:09:39.000000000 +0100
+++ b/configure	2009-07-28 01:17:14.000000000 +0200
@@ -33628,19 +33628,6 @@ _ACEOF
            ;;
          esac
        fi
-        # Set up files for the joystick library
-        if test x$enable_joystick = xyes; then
-          case $ARCH in
-            linux)
-                cat >>confdefs.h <<\_ACEOF
-#define SDL_JOYSTICK_LINUX 1
-_ACEOF
-
-                SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
-                have_joystick=yes
-            ;;
-          esac
-        fi
        # Set up files for the cdrom library
        if test x$enable_cdrom = xyes; then
          case $ARCH in
diff -rupN a/src/video/fbcon/SDL_fbvideo.c b/src/video/fbcon/SDL_fbvideo.c
--- a/src/video/fbcon/SDL_fbvideo.c	2007-12-31 05:48:08.000000000 +0100
+++ b/src/video/fbcon/SDL_fbvideo.c	2009-07-20 22:35:57.000000000 +0200
@@ -720,16 +720,8 @@ static int FB_VideoInit(_THIS, SDL_Pixel
		FB_VideoQuit(this);
		return(-1);
	}
-	if ( FB_OpenMouse(this) < 0 ) {
-		const char *sdl_nomouse;

-		sdl_nomouse = SDL_getenv("SDL_NOMOUSE");
-		if ( ! sdl_nomouse ) {
-			SDL_SetError("Unable to open mouse");
-			FB_VideoQuit(this);
-			return(-1);
-		}
-	}
+	FB_OpenMouse(this);

	/* We're done! */
	return(0);

(Get it from buildroot-dingux-20090927.tar.bz2 - packages/sdl)

D_Skywalk, configure optimized diff:

--- a/configure	2009-10-13 18:22:41.000000000 +0200
+++ b/configure	2009-10-13 17:50:49.000000000 +0200
@@ -2979,7 +2979,7 @@
  CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
+    CFLAGS="-O3"
  else
    CFLAGS="-g"
  fi
@@ -5545,7 +5545,7 @@
  CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
-    CXXFLAGS="-g -O2"
+    CXXFLAGS="-O3"
  else
    CXXFLAGS="-g"
  fi
@@ -6037,7 +6037,7 @@
  FFLAGS=$ac_save_FFLAGS
elif test $ac_cv_prog_f77_g = yes; then
  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
-    FFLAGS="-g -O2"
+    FFLAGS="-O3"
  else
    FFLAGS="-g"
  fi
@@ -19719,7 +19719,7 @@
  CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
+    CFLAGS="-O3"
  else
    CFLAGS="-g"
  fi
@@ -20198,7 +20198,7 @@
  CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
-    CXXFLAGS="-g -O2"
+    CXXFLAGS="-O3"
  else
    CXXFLAGS="-g"
  fi

[edit] SDL_mixer

[edit] Recomend libraries

[edit] OGG Support

Website: Is a fixed-point version of the Ogg Vorbis decoder for little platforms like dingoo

Download Source: libvorbisidec_1.0.2+svn14261.orig.tar.gz

Compile With:

./configure --prefix=/opt/mipsel-linux-uclibc/usr --target=mipsel-linux --host=mipsel-linux --enable-shared --enable-static

[edit] MP3 Support

Website: Same tremor but for MP3 files, fixed-point and optimized for little platforms

Download Source: libmad-0.15.1b.tar.gz

Compile With:

./configure --prefix=/opt/mipsel-linux-uclibc/usr --target=mipsel-linux --host=mipsel-linux --enable-shared --enable-static \
--disable-debugging --enable-speed

[edit] Compile Flags

SDL_mixer-1.2.8$ ./configure --prefix=/opt/mipsel-linux-uclibc/usr --target=mipsel-linux --host=mipsel-linux --enable-shared --enable-static \
--disable-sdltest --enable-music-wave --enable-music-libmikmod --enable-music-mod --enable-music-ogg-tremor  --enable-music-mp3-mad-gpl \
--disable-music-mp3 --disable-smpegtest --without-x
Personal tools