fix build with GP2XCROSS

This commit is contained in:
Thomas Bernard 2019-02-09 15:46:33 +01:00
parent fe5a9c3278
commit e278d0551c
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C
3 changed files with 7 additions and 1 deletions

View File

@ -508,7 +508,8 @@ endif
CC = /opt/open2x/gcc-4.1.1-glibc-2.3.6/bin/arm-open2x-linux-gcc CC = /opt/open2x/gcc-4.1.1-glibc-2.3.6/bin/arm-open2x-linux-gcc
BIN = ../bin/grafx2.gpe BIN = ../bin/grafx2.gpe
SDLCONFIG = /opt/open2x/gcc-4.1.1-glibc-2.3.6/bin/sdl-config SDLCONFIG = /opt/open2x/gcc-4.1.1-glibc-2.3.6/bin/sdl-config
COPT = -W -Wall -Wdeclaration-after-statement -pedantic -std=c99 -static -g -O$(OPTIM) COPT = -W -Wall -Wdeclaration-after-statement -std=c99 -static -g -O$(OPTIM)
COPT += -D_XOPEN_SOURCE=500
COPT += -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include COPT += -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include
COPT += $(shell $(SDLCONFIG) --cflags) COPT += $(shell $(SDLCONFIG) --cflags)
COPT += -D__GP2X__ $(TTFCOPT) $(JOYCOPT) $(LUACOPT) COPT += -D__GP2X__ $(TTFCOPT) $(JOYCOPT) $(LUACOPT)

View File

@ -24,8 +24,10 @@
#include <string.h> #include <string.h>
#if defined(USE_SDL) || defined(USE_SDL2) #if defined(USE_SDL) || defined(USE_SDL2)
#include <SDL.h> #include <SDL.h>
#if (defined(SDL_VIDEO_DRIVER_X11) && !defined(NO_X11)) || defined(__WIN32__)
#include <SDL_syswm.h> #include <SDL_syswm.h>
#endif #endif
#endif
#ifdef WIN32 #ifdef WIN32
#include <windows.h> #include <windows.h>

View File

@ -33,8 +33,11 @@
#include <windows.h> // for HWND #include <windows.h> // for HWND
#endif #endif
#if defined(USE_SDL) || defined(USE_SDL2) #if defined(USE_SDL) || defined(USE_SDL2)
#include <SDL.h>
#if defined(SDL_VIDEO_DRIVER_X11)
#include <SDL_syswm.h> // for Display, Window #include <SDL_syswm.h> // for Display, Window
#endif #endif
#endif
#if defined(USE_X11) #if defined(USE_X11)
#include <X11/Xlib.h> // for Display, Window #include <X11/Xlib.h> // for Display, Window
#endif #endif