Bläddra i källkod

build: a lot more emscripten build fixes.

legacy
Sam Hocevar sam 11 år sedan
förälder
incheckning
f852e8d7e1
6 ändrade filer med 25 tillägg och 17 borttagningar
  1. +1
    -1
      build/autotools/m4/lol-sdl.m4
  2. +1
    -1
      build/lol-build
  3. +2
    -1
      configure.ac
  4. +5
    -5
      src/application/application.cpp
  5. +11
    -9
      src/sys/timer.cpp
  6. +5
    -0
      src/ticker.cpp

+ 1
- 1
build/autotools/m4/lol-sdl.m4 Visa fil

@@ -66,7 +66,7 @@ if test "x${cross_compiling}" != xyes -a "x${ac_cv_my_have_sdl}" = xno; then
ac_cv_my_have_sdl="yes"
SDL_CFLAGS="${SDL_CFLAGS} `${SDL_CONFIG} --cflags`"
SDL_LIBS="${SDL_LIBS} `${SDL_CONFIG} --libs`"
AC_DEFINE(HAVE_SDL_H, 1, Define to 1 to use SDL.h),
AC_DEFINE(HAVE_SDL_H, 1, Define to 1 to use SDL.h)
fi
fi



+ 1
- 1
build/lol-build Visa fil

@@ -240,7 +240,7 @@ configure()
;;
emscripten-*)
EM_HOME=$HOME/emscripten
./configure CC=$EM_HOME/emcc CXX=$EM_HOME/em++ AR=$EM_HOME/emar RANLIB=$EM_HOME/emranlib PKG_CONFIG=false ac_cv_exeext=".${platform##emscripten-}"
./configure CC=$EM_HOME/emcc CXX=$EM_HOME/em++ AR=$EM_HOME/emar RANLIB=$EM_HOME/emranlib PKG_CONFIG=/bin/false SDL_CONFIG=/bin/false ac_cv_exeext=".${platform##emscripten-}"
;;
*)
PATH="$PATH" ./configure CFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS"


+ 2
- 1
configure.ac Visa fil

@@ -77,7 +77,7 @@ AC_CHECK_HEADERS(stdio.h stdarg.h inttypes.h endian.h stdint.h getopt.h)
AC_CHECK_HEADERS(fastmath.h pthread.h libutil.h util.h pty.h glob.h unistd.h)
AC_CHECK_HEADERS(execinfo.h)
AC_CHECK_HEADERS(sys/ioctl.h sys/ptrace.h sys/stat.h sys/syscall.h sys/user.h)
AC_CHECK_HEADERS(sys/wait.h)
AC_CHECK_HEADERS(sys/wait.h sys/time.h)
AC_CHECK_HEADERS(linux/kdev_t.h linux/major.h)
AC_CHECK_HEADERS(security/pam_appl.h security/pam_misc.h)
AC_CHECK_HEADERS(pam/pam_appl.h pam/pam_misc.h)
@@ -89,6 +89,7 @@ AC_LANG_POP(C++)

dnl Common C functions
AC_CHECK_FUNCS(getenv system tmpfile tmpnam getcwd _getcwd backtrace_symbols)
AC_CHECK_FUNCS(gettimeofday usleep)


if test "${enable_debug}" = "yes"; then


+ 5
- 5
src/application/application.cpp Visa fil

@@ -24,11 +24,11 @@
# include "platform/nacl/nacl-app.h"
#elif defined __ANDROID__
# include "platform/android/androidapp.h"
#elif defined HAVE_GLES_2X
# include "eglapp.h"
#else
#elif defined USE_SDL
# include "platform/sdl/sdlapp.h"
# include "platform/sdl/sdlinput.h"
#elif defined HAVE_GLES_2X
# include "eglapp.h"
#endif

using namespace std;
@@ -52,11 +52,11 @@ class ApplicationData
NaClApp app;
#elif defined __ANDROID__
AndroidApp app;
#elif defined USE_SDL
SdlApp app;
#elif defined HAVE_GLES_2X
/* FIXME: this macro is only deactivated if we include "lolgl.h" */
EglApp app;
#elif defined USE_SDL
SdlApp app;
#else
# error No application class available on this platform
#endif


+ 11
- 9
src/sys/timer.cpp Visa fil

@@ -8,29 +8,30 @@
// http://www.wtfpl.net/ for more details.
//

#if defined HAVE_CONFIG_H
#if HAVE_CONFIG_H
# include "config.h"
#endif

#include <cstdlib>
#include <stdint.h>

#if defined __linux__ || defined __native_client__ || defined __APPLE__
#if __linux__ || __native_client__ || __APPLE__ \
|| (HAVE_GETTIMEOFDAY && HAVE_USLEEP && HAVE_SYS_TIME_H && HAVE_UNISTD_H)
# include <sys/time.h>
# include <unistd.h>
#elif defined _XBOX
#elif _XBOX
# include <xtl.h>
# undef near /* Fuck Microsoft */
# undef far /* Fuck Microsoft again */
# include <xbox.h>
#elif defined _WIN32
#elif _WIN32
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#elif defined __CELLOS_LV2__
#elif __CELLOS_LV2__
# include <sys/sys_time.h>
# include <sys/timer.h>
# include <sys/time_util.h>
#elif defined HAVE_SDL_SDL_H
#elif HAVE_SDL_SDL_H
# include <SDL/SDL.h>
#else
# include <SDL.h>
@@ -55,7 +56,8 @@ private:
(void)GetSeconds(true);
}

#if defined __linux__ || defined __native_client__ || defined __APPLE__
#if __linux__ || __native_client__ || __APPLE__ \
|| (HAVE_GETTIMEOFDAY && HAVE_USLEEP)
float GetSeconds(bool reset)
{
struct timeval tv, tv0 = m_tv;
@@ -73,7 +75,7 @@ private:

struct timeval m_tv;

#elif defined _WIN32
#elif _WIN32
float GetSeconds(bool reset)
{
static float secs_per_cycle = GetSecondsPerCycle();
@@ -99,7 +101,7 @@ private:

LARGE_INTEGER m_cycles;

#elif defined __CELLOS_LV2__
#elif __CELLOS_LV2__
float GetSeconds(bool reset)
{
static float secs_per_cycle = GetSecondsPerCycle();


+ 5
- 0
src/ticker.cpp Visa fil

@@ -422,6 +422,11 @@ void TickerData::DrawThreadTick()
Profiler::Stop(Profiler::STAT_TICK_DRAW);
}

void TickerData::DiskThreadTick()
{
;
}

void Ticker::SetState(Entity * /* entity */, uint32_t /* state */)
{



Laddar…
Avbryt
Spara