enable to build WIN32CROSS=1 API=sdl2
This commit is contained in:
parent
7a2aa2811f
commit
5377b8c9fe
@ -452,6 +452,7 @@ endif
|
|||||||
CROSS_CC ?= $(shell which i686-w64-mingw32-gcc || which mingw32-gcc)
|
CROSS_CC ?= $(shell which i686-w64-mingw32-gcc || which mingw32-gcc)
|
||||||
CROSS_PKGCONFIG ?= $(shell which i686-w64-mingw32-pkg-config || which mingw32-pkg-config || which $(PKG_CONFIG))
|
CROSS_PKGCONFIG ?= $(shell which i686-w64-mingw32-pkg-config || which mingw32-pkg-config || which $(PKG_CONFIG))
|
||||||
CROSS_SDLCONFIG ?= $(shell which ../3rdparty/usr/bin/sdl-config || which /usr/local/cross-tools/i386-mingw32/bin/sdl-config)
|
CROSS_SDLCONFIG ?= $(shell which ../3rdparty/usr/bin/sdl-config || which /usr/local/cross-tools/i386-mingw32/bin/sdl-config)
|
||||||
|
CROSS_SDL2CONFIG ?= $(shell which ../3rdparty/usr/bin/sdl2-config || which /usr/local/cross-tools/i386-mingw32/bin/sdl2-config)
|
||||||
CROSS_PKG_CONFIG_PATH ?= $(shell if [ -d ../3rdparty/usr ] ; then echo "$${PWD}/../3rdparty/usr/lib/pkgconfig" ; fi )
|
CROSS_PKG_CONFIG_PATH ?= $(shell if [ -d ../3rdparty/usr ] ; then echo "$${PWD}/../3rdparty/usr/lib/pkgconfig" ; fi )
|
||||||
CC = $(CROSS_CC)
|
CC = $(CROSS_CC)
|
||||||
CROSS_STRIP ?= $(shell which i686-w64-mingw32-strip || which mingw32-strip)
|
CROSS_STRIP ?= $(shell which i686-w64-mingw32-strip || which mingw32-strip)
|
||||||
@ -463,6 +464,10 @@ endif
|
|||||||
COPT += -Dmain=SDL_main $(shell $(CROSS_SDLCONFIG) --cflags)
|
COPT += -Dmain=SDL_main $(shell $(CROSS_SDLCONFIG) --cflags)
|
||||||
LOPT += -lSDLmain -lSDL $(shell $(CROSS_SDLCONFIG) --libs) -lSDL_image
|
LOPT += -lSDLmain -lSDL $(shell $(CROSS_SDLCONFIG) --libs) -lSDL_image
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(API),sdl2)
|
||||||
|
COPT += $(shell $(CROSS_SDL2CONFIG) --cflags)
|
||||||
|
LOPT += $(shell $(CROSS_SDL2CONFIG) --libs) -lSDL2_image
|
||||||
|
endif
|
||||||
ifeq (,$(CROSS_PKGCONFIG))
|
ifeq (,$(CROSS_PKGCONFIG))
|
||||||
COPT += -D__no_pnglib__ -D__no_tifflib__
|
COPT += -D__no_pnglib__ -D__no_tifflib__
|
||||||
else
|
else
|
||||||
@ -481,6 +486,9 @@ endif
|
|||||||
ifeq ($(API),sdl)
|
ifeq ($(API),sdl)
|
||||||
PLATFORMFILES += bin/SDL.dll bin/SDL_image.dll
|
PLATFORMFILES += bin/SDL.dll bin/SDL_image.dll
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(API),sdl2)
|
||||||
|
PLATFORMFILES += bin/SDL2.dll bin/SDL2_image.dll
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
ifdef GP2XCROSS
|
ifdef GP2XCROSS
|
||||||
#cross compile an exec for the gp2x
|
#cross compile an exec for the gp2x
|
||||||
|
|||||||
@ -1374,7 +1374,7 @@ int Get_input(int sleep_time)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
case SDL_SYSWMEVENT:
|
case SDL_SYSWMEVENT:
|
||||||
#ifdef __WIN32__
|
#if defined(USE_SDL) && defined(__WIN32__)
|
||||||
if(event.syswm.msg->msg == WM_DROPFILES)
|
if(event.syswm.msg->msg == WM_DROPFILES)
|
||||||
{
|
{
|
||||||
int file_count;
|
int file_count;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user