Quellcode durchsuchen

build: hide the SDL_main.h inclusion in core.h, and only activate it

on Windows if using Visual Studio; if using MinGW, try to stick to the
original main() entry point.
legacy
Sam Hocevar sam vor 12 Jahren
Ursprung
Commit
5bd24fa1d3
16 geänderte Dateien mit 23 neuen und 65 gelöschten Zeilen
  1. +12
    -2
      configure.ac
  2. +6
    -1
      src/core.h
  3. +0
    -4
      test/BtPhysTest.cpp
  4. +0
    -4
      test/benchsuite.cpp
  5. +0
    -4
      test/debug/quad.cpp
  6. +0
    -4
      test/math/pi.cpp
  7. +0
    -4
      test/math/poly.cpp
  8. +0
    -4
      test/math/remez.cpp
  9. +0
    -4
      test/sandbox/sample.cpp
  10. +0
    -4
      test/testsuite.cpp
  11. +0
    -4
      test/xolotl/xolotl.cpp
  12. +0
    -4
      tutorial/01_triangle.cpp
  13. +0
    -4
      tutorial/02_cube.cpp
  14. +0
    -4
      tutorial/05_easymesh.cpp
  15. +0
    -4
      tutorial/08_fbo.cpp
  16. +5
    -10
      tutorial/11_fractal.cpp

+ 12
- 2
configure.ac Datei anzeigen

@@ -123,6 +123,17 @@ AM_CONDITIONAL(USE_MAKE_FSELF, test "${MAKE_FSELF}" != "no")
AM_CONDITIONAL(USE_PS3, test "${ac_cv_my_have_ps3}" != "no")


dnl Are we building using MinGW?
LIBS_save="$LIBS"
LIBS="$LIBS -mwindows"
AC_MSG_CHECKING(for -mwindows)
AC_TRY_LINK([], [],
[AC_MSG_RESULT(yes)
LOL_LIBS="${LOL_LIBS} -mwindows"],
[AC_MSG_RESULT(no)])
LIBS="$LIBS_save"


dnl Are we on the Xbox 360?
dnl Answer: NO! we don't know how to build for it anyway
AM_CONDITIONAL(USE_X360, false)
@@ -142,8 +153,7 @@ LIBS_save="$LIBS"
LIBS="$LIBS -Wl,-framework -Wl,OpenGL"
AC_MSG_CHECKING(for -framework OpenGL)
AC_TRY_LINK([], [],
[ac_cv_my_have_cocoa="yes"
AC_MSG_RESULT(yes)
[AC_MSG_RESULT(yes)
GL_LIBS="${GL_LIBS} -framework OpenGL"
CXXFLAGS="${CXXFLAGS} -ObjC++"],
[AC_MSG_RESULT(no)])


+ 6
- 1
src/core.h Datei anzeigen

@@ -61,11 +61,16 @@ static inline int isnan(float f)
}
#endif

/* If using NaCl, override main with our version */
/* If using NaCl, override main() with our version */
#if defined __native_client__
# define main lol_nacl_main
#endif

/* If using SDL and Visual Studio, let it override main() */
#if defined _MSVC && defined USE_SDL
# include <SDL_main.h>
#endif

// Base types
#include "lol/debug.h"
#include "lol/math/math.h"


+ 0
- 4
test/BtPhysTest.cpp Datei anzeigen

@@ -28,10 +28,6 @@
# include <cmath>
#endif

#if USE_SDL
# include <SDL_main.h>
#endif

#include "core.h"
#include "loldebug.h"



+ 0
- 4
test/benchsuite.cpp Datei anzeigen

@@ -14,10 +14,6 @@

#include <cstdio>

#if USE_SDL
# include <SDL_main.h>
#endif

#include "core.h"

using namespace std;


+ 0
- 4
test/debug/quad.cpp Datei anzeigen

@@ -19,10 +19,6 @@
using namespace std;
using namespace lol;

#if USE_SDL
# include <SDL_main.h>
#endif

int main(int argc, char **argv)
{
Application app("Quad", ivec2(640, 480), 60.0f);


+ 0
- 4
test/math/pi.cpp Datei anzeigen

@@ -14,10 +14,6 @@

#include <cstdio>

#if USE_SDL
# include <SDL_main.h>
#endif

#include "core.h"

using std::printf;


+ 0
- 4
test/math/poly.cpp Datei anzeigen

@@ -14,10 +14,6 @@

#include <cstdio>

#if USE_SDL
# include <SDL_main.h>
#endif

#include "core.h"

using namespace lol;


+ 0
- 4
test/math/remez.cpp Datei anzeigen

@@ -12,10 +12,6 @@
# include "config.h"
#endif

#if USE_SDL
# include <SDL_main.h>
#endif

#include "lol/math/real.h"
#include "lol/math/remez.h"



+ 0
- 4
test/sandbox/sample.cpp Datei anzeigen

@@ -12,10 +12,6 @@
# include "config.h"
#endif

#if USE_SDL
# include <SDL_main.h>
#endif

#include "core.h"

class Moo


+ 0
- 4
test/testsuite.cpp Datei anzeigen

@@ -15,10 +15,6 @@
#include <cstdio>
#include <cstdlib>

#if USE_SDL
# include <SDL_main.h>
#endif

#include <lol/unit.h>

int main(int argc, char **argv)


+ 0
- 4
test/xolotl/xolotl.cpp Datei anzeigen

@@ -19,10 +19,6 @@

using namespace lol;

#if USE_SDL
# include <SDL_main.h>
#endif

#include "xolotl.h"

class Xolotl : public WorldEntity


+ 0
- 4
tutorial/01_triangle.cpp Datei anzeigen

@@ -18,10 +18,6 @@
using namespace std;
using namespace lol;

#if USE_SDL
# include <SDL_main.h>
#endif

#if defined _WIN32
# include <direct.h>
#endif


+ 0
- 4
tutorial/02_cube.cpp Datei anzeigen

@@ -18,10 +18,6 @@
using namespace std;
using namespace lol;

#if USE_SDL
# include <SDL_main.h>
#endif

#if defined _WIN32
# include <direct.h>
#endif


+ 0
- 4
tutorial/05_easymesh.cpp Datei anzeigen

@@ -17,10 +17,6 @@
using namespace std;
using namespace lol;

#if USE_SDL
# include <SDL_main.h>
#endif

class EasyMeshTutorial : public WorldEntity
{
public:


+ 0
- 4
tutorial/08_fbo.cpp Datei anzeigen

@@ -18,10 +18,6 @@
using namespace std;
using namespace lol;

#if USE_SDL
# include <SDL_main.h>
#endif

#if defined _WIN32
# include <direct.h>
#endif


+ 5
- 10
tutorial/11_fractal.cpp Datei anzeigen

@@ -20,18 +20,13 @@

using namespace lol;

#if defined _WIN32 && defined USE_D3D9
# define FAR
# define NEAR
# include <d3d9.h>
#endif

#if USE_SDL
# include <SDL_main.h>
#endif

#if defined _WIN32
# include <direct.h>
# if defined USE_D3D9
# define FAR
# define NEAR
# include <d3d9.h>
# endif
#endif

extern char const *lolfx_11_fractal;


Laden…
Abbrechen
Speichern