Changeset 840


Ignore:
Timestamp:
Aug 20, 2011, 11:28:53 PM (8 years ago)
Author:
sam
Message:

ps3: add a build-ps3 script that uses autoconf and automake.

Location:
trunk
Files:
1 added
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r802 r840  
    7070fi
    7171
     72dnl No exceptions
     73CXXFLAGS="${CXXFLAGS} -fno-exceptions"
    7274dnl Optimizations
    7375CXXFLAGS="${CXXFLAGS} ${REL} ${OPT}"
     
    7678
    7779AC_CHECK_LIB(m, sin, MATH_LIBS="${MATH_LIBS} -lm")
     80
     81
     82dnl Are we on the PS3?
     83AC_CHECK_LIB(sysmodule_stub, cellSysmoduleLoadModule,
     84 [LOL_LIBS="${LOL_LIBS} -lsysmodule_stub -lsysutil_stub -lresc_stub"
     85  dnl  For PSGL
     86  AC_DEFINE(HAVE_GLES_2X, 1, Define to 1 if GLES 2.x is available) # FIXME: hack
     87  GL_LIBS="${GL_LIBS} -lPSGL -lgcm_cmd -lgcm_sys_stub"
     88  if test "x${enable_debug}" = xyes; then
     89    GL_LIBS="${GL_LIBS} -L${CELL_SDK}/target/ppu/lib/PSGL/RSX/debug"
     90  elif test "x${enable_release}" = xyes; then
     91    GL_LIBS="${GL_LIBS} -L${CELL_SDK}/target/ppu/lib/PSGL/RSX/ultra-opt"
     92  else
     93    GL_LIBS="${GL_LIBS} -L${CELL_SDK}/target/ppu/lib/PSGL/RSX/opt"
     94  fi
     95  dnl  For the runtime Cg compiler
     96  GL_LIBS="${GL_LIBS} -lcgc -lPSGLcgc"
     97  dnl  For the PNG decoder
     98  LOL_LIBS="${LOL_LIBS} -lpngdec_stub"
     99  dnl  For the pad library
     100  LOL_LIBS="${LOL_LIBS} -lio_stub -lusbd_stub -lpadfilter"
     101  AC_PATH_PROG(MAKE_FSELF, make_fself, no)
     102  AM_CONDITIONAL(USE_MAKE_FSELF, test "${MAKE_FSELF}" != "no")])
     103
    78104
    79105dnl Which version of OpenGL to use?
     
    96122   [glLoadIdentity();],
    97123   [ac_cv_my_have_gl="yes"
    98     AC_DEFINE(HAVE_GL_2X, 1, Define to 1 if GL 2.x is available) # FIXME: hacky
     124    AC_DEFINE(HAVE_GL_2X, 1, Define to 1 if GL 2.x is available) # FIXME: hack
    99125    AC_MSG_RESULT(yes)
    100126    GL_LIBS="-lopengl32"],
    101127   [AC_MSG_RESULT(no)])
    102128  LIBS="$LIBS_save"])
     129AC_CHECK_HEADER(PSGL/psgl.h,
     130 [ac_cv_my_have_gl="yes"])
    103131if test "${ac_cv_my_have_gl}" = "no"; then
    104132  AC_MSG_ERROR([[No OpenGL or OpenGL ES implementation found]])
     
    136164LIBS="${save_LIBS}"
    137165
    138 dnl Use SDL? (always required)
     166dnl Use SDL? (always required on Linux or Win32)
    139167ac_cv_my_have_sdl="yes"
    140168AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
    141 if test "${SDL_CONFIG}" != "no"; then
     169if test "${SDL_CONFIG}" != "no" -a "x$cross_compiling" != xyes; then
    142170  SDL_CFLAGS="${SDL_CFLAGS} `sdl-config --cflags`"
    143171  SDL_LIBS="${SDL_LIBS} `sdl-config --libs`"
     
    160188CPPFLAGS="${save_CPPFLAGS}"
    161189if test "${ac_cv_my_have_sdl}" = "no"; then
    162   AC_MSG_ERROR([[One of SDL, SDL_Image or SDL_Mixer not found]])
     190  AC_MSG_WARN([[One of SDL, SDL_Image or SDL_Mixer not found]])
    163191else
    164192  AC_DEFINE(USE_SDL, 1, Define to 1 to use SDL)
  • trunk/deushax/Makefile.am

    r785 r840  
    1010deushax_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@
    1111deushax_DEPENDENCIES = $(top_builddir)/src/liblol.a
     12
     13if USE_MAKE_FSELF
     14all-local: deushax$(EXEEXT)
     15        make_fself deushax$(EXEEXT) deushax.self
     16clean-local:
     17        rm -f deushax.self
     18endif
    1219
    1320if USE_GTKGL
  • trunk/deushax/debugsprite.cpp

    r792 r840  
    1212#include "core.h"
    1313
     14using namespace std;
    1415using namespace lol;
    1516
  • trunk/monsterz/Makefile.am

    r754 r840  
    1010monsterz_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@
    1111monsterz_DEPENDENCIES = $(top_builddir)/src/liblol.a
     12
     13if USE_MAKE_FSELF
     14all-local: monsterz$(EXEEXT)
     15        make_fself monsterz$(EXEEXT) monsterz.self
     16clean-local:
     17        rm -f monsterz.self
     18endif
    1219
    1320EXTRA_DIST = $(PNG) $(WAV)
  • trunk/src/ps3app.cpp

    r820 r840  
    9595    PSGLcontext *ctx = psglCreateContext();
    9696    psglMakeCurrent(ctx, psgl);
    97     psglLoadShaderLibrary(REMOTE_PATH "/shaders.bin");
     97    /* TODO: load our shaders when we actually ship them */
     98    //psglLoadShaderLibrary("/shaders.bin");
    9899    psglResetCurrentContext();
    99100
  • trunk/src/sdlinput.cpp

    r781 r840  
    1313#endif
    1414
    15 #include <SDL.h>
     15#if defined USE_SDL
     16#   include <SDL.h>
     17#endif
    1618
    1719#include "core.h"
     
    4042  : data(new SdlInputData())
    4143{
     44#if defined USE_SDL
    4245    SDL_Init(SDL_INIT_TIMER);
    4346
    4447    gamegroup = GAMEGROUP_BEFORE;
     48#endif
    4549}
    4650
    4751void SdlInput::TickGame(float deltams)
    4852{
     53#if defined USE_SDL
    4954    Entity::TickGame(deltams);
    5055
     
    8994            Input::KeyPressed(i, deltams);
    9095#endif
     96#endif
    9197}
    9298
     
    100106    vec2i ret(-1, -1);
    101107
     108#if defined USE_SDL
    102109    if (SDL_GetAppState() & SDL_APPMOUSEFOCUS)
    103110    {
     
    105112        ret.y = Video::GetSize().y - 1 - ret.y;
    106113    }
     114#endif
    107115    return ret;
    108116}
Note: See TracChangeset for help on using the changeset viewer.