Browse Source

build: tweak everything to allow building with SDL on the Raspberry Pi.

legacy
Sam Hocevar sam 12 years ago
parent
commit
9b5880936c
9 changed files with 46 additions and 12 deletions
  1. +1
    -1
      build/lol-build
  2. +2
    -2
      configure.ac
  3. +10
    -2
      src/audio.cpp
  4. +10
    -2
      src/image/codec/sdl-image.cpp
  5. +3
    -1
      src/input/input.cpp
  6. +5
    -1
      src/platform/sdl/sdlapp.cpp
  7. +3
    -1
      src/platform/sdl/sdlinput.cpp
  8. +10
    -2
      src/sample.cpp
  9. +2
    -0
      src/timer.cpp

+ 1
- 1
build/lol-build View File

@@ -166,7 +166,7 @@ configure()
# ant clean
;;
raspi-arm)
./configure --host=arm-bcm2708hardfp-linux-gnueabi CPPFLAGS="-I$RASPI_SDK_ROOT/firmware/opt/vc/include -I$RASPI_SDK_ROOT/firmware/opt/vc/include/interface/vcos/pthreads" LDFLAGS="-L$RASPI_SDK_ROOT/firmware/opt/vc/lib"
./configure --host=arm-bcm2708hardfp-linux-gnueabi CPPFLAGS="-I$RASPI_SDK_ROOT/firmware/opt/vc/include -I$RASPI_SDK_ROOT/firmware/opt/vc/include/interface/vcos/pthreads -I$RASPI_SDK_ROOT/chroot/usr/include" LDFLAGS="-L$RASPI_SDK_ROOT/firmware/opt/vc/lib -L$RASPI_SDK_ROOT/chroot/lib/arm-linux-gnueabihf -Wl,-rpath-link -Wl,$RASPI_SDK_ROOT/chroot/lib/arm-linux-gnueabihf -L$RASPI_SDK_ROOT/chroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link -Wl,$RASPI_SDK_ROOT/chroot/usr/lib/arm-linux-gnueabihf -Wl,--unresolved-symbols=ignore-in-shared-libs"
;;
nacl-i386)
./configure CXX=i686-nacl-g++ CC=i686-nacl-gcc ac_cv_exeext=.32.nexe --host=i386 LOL_LIBS="-lppapi -lppapi_gles2 -lppapi_cpp -u _ZN2pp12CreateModuleEv"


+ 2
- 2
configure.ac View File

@@ -294,8 +294,8 @@ save_LIBS="${LIBS}"
CPPFLAGS="${CPPFLAGS} ${SDL_CFLAGS} ${SDLMIXER_CFLAGS} ${SDLIMAGE_CFLAGS}"
LIBS="${LIBS} ${SDL_LIBS} ${SDLMIXER_LIBS} ${SDLIMAGE_LIBS}"
AC_CHECK_HEADERS(SDL.h SDL/SDL.h, [ac_cv_my_have_sdl="yes"])
AC_CHECK_HEADERS(SDL_mixer.h, [ac_cv_my_have_sdl_mixer="yes"])
AC_CHECK_HEADERS(SDL_image.h, [ac_cv_my_have_sdl_image="yes"])
AC_CHECK_HEADERS(SDL_mixer.h SDL/SDL_mixer.h, [ac_cv_my_have_sdl_mixer="yes"])
AC_CHECK_HEADERS(SDL_image.h SDL/SDL_image.h, [ac_cv_my_have_sdl_image="yes"])
AC_CHECK_LIB(SDL, main,
[SDL_LIBS="${SDL_LIBS} -lSDL"],
[ac_cv_my_have_sdl="no"])


+ 10
- 2
src/audio.cpp View File

@@ -13,8 +13,16 @@
#endif

#if defined USE_SDL_MIXER
# include <SDL.h>
# include <SDL_mixer.h>
# if defined HAVE_SDL_SDL_H
# include <SDL/SDL.h>
# else
# include <SDL.h>
# endif
# if defined HAVE_SDL_SDL_MIXER_H
# include <SDL/SDL_mixer.h>
# else
# include <SDL_mixer.h>
# endif
#endif

#include "core.h"


+ 10
- 2
src/image/codec/sdl-image.cpp View File

@@ -14,8 +14,16 @@

#if defined USE_SDL_IMAGE

#include <SDL.h>
#include <SDL_image.h>
#if defined HAVE_SDL_SDL_H
# include <SDL/SDL.h>
#else
# include <SDL.h>
#endif
#if defined HAVE_SDL_SDL_IMAGE_H
# include <SDL/SDL_image.h>
#else
# include <SDL_image.h>
#endif

#include "core.h"
#include "../../image/image-private.h"


+ 3
- 1
src/input/input.cpp View File

@@ -14,7 +14,9 @@

#include <cstdlib>

#if defined USE_SDL
#if defined HAVE_SDL_SDL_H
# include <SDL/SDL.h>
#else
# include <SDL.h>
#endif



+ 5
- 1
src/platform/sdl/sdlapp.cpp View File

@@ -13,7 +13,11 @@
#endif

#if defined USE_SDL
# include <SDL.h>
# if defined HAVE_SDL_SDL_H
# include <SDL/SDL.h>
# else
# include <SDL.h>
# endif
# if defined USE_D3D9
# include <d3d9.h>
# include <SDL_syswm.h>


+ 3
- 1
src/platform/sdl/sdlinput.cpp View File

@@ -12,7 +12,9 @@
# include "config.h"
#endif

#if defined USE_SDL
#if defined HAVE_SDL_SDL_H
# include <SDL/SDL.h>
#else
# include <SDL.h>
#endif



+ 10
- 2
src/sample.cpp View File

@@ -17,8 +17,16 @@
#include <cstring>

#if defined USE_SDL_MIXER
# include <SDL.h>
# include <SDL_mixer.h>
# if defined HAVE_SDL_SDL_H
# include <SDL/SDL.h>
# else
# include <SDL.h>
# endif
# if defined HAVE_SDL_SDL_MIXER_H
# include <SDL/SDL_mixer.h>
# else
# include <SDL_mixer.h>
# endif
#endif

#include "core.h"


+ 2
- 0
src/timer.cpp View File

@@ -30,6 +30,8 @@
# include <sys/sys_time.h>
# include <sys/timer.h>
# include <sys/time_util.h>
#elif defined HAVE_SDL_SDL_H
# include <SDL/SDL.h>
#else
# include <SDL.h>
#endif


Loading…
Cancel
Save