Fix building with MinGW from Linux

This commit is contained in:
Adrien Destugues 2017-05-08 09:33:01 +02:00
parent 317dc5c667
commit a321c4c785
3 changed files with 5 additions and 3 deletions

View File

@ -318,10 +318,12 @@ endif
# These can only be used under linux and maybe freebsd. They allow to compile for the gp2x or to create a windows binary
ifdef WIN32CROSS
#cross compile a Win32 executable
CC = i586-mingw32msvc-gcc
CC = i686-w64-mingw32-gcc
BIN = ../bin/grafx2.exe
COPT = -W -Wall -Wdeclaration-after-statement -O$(OPTIM) -g -ggdb -Dmain=SDL_main $(shell /usr/local/cross-tools/i386-mingw32/bin/sdl-config --cflags) $(TTFCOPT)
LOPT = -mwindows -lmingw32 -lSDLmain -lSDL -lshlwapi $(shell /usr/local/cross-tools/i386-mingw32/bin/sdl-config --libs) -lSDL_image $(TTFLOPT)
COPT += $(shell PKG_CONFIG_PATH=/usr/local/cross-tools/i386-mingw32/lib/pkgconfig i686-w64-mingw32-pkg-config --cflags libpng)
LOPT += $(shell PKG_CONFIG_PATH=/usr/local/cross-tools/i386-mingw32/lib/pkgconfig i686-w64-mingw32-pkg-config --libs libpng)
OBJDIR = ../obj/win32
PLATFORM = win32
else

View File

@ -25,7 +25,7 @@
#ifdef __WIN32__
#include <windows.h>
#include <ShellApi.h>
#include <shellapi.h>
#endif
#include "global.h"

View File

@ -43,7 +43,7 @@
#include "engine.h"
#ifdef __WIN32__
#include <Windows.h>
#include <windows.h>
#include <SDL_syswm.h>
#elif defined __HAIKU__
#include "haiku.h"