changeset 1244:0a34e31c4fd0

Update Windows build to use mingw-w64 cross compiler rather than Wine
author Michael Pavone <pavone@retrodev.com>
date Sun, 26 Feb 2017 23:18:21 -0800
parents 50700d370a33
children 42fb3ee1e92c
files Makefile menu.c
diffstat 2 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sun Feb 26 20:50:03 2017 -0800
+++ b/Makefile	Sun Feb 26 23:18:21 2017 -0800
@@ -5,17 +5,20 @@
 
 ifeq ($(OS),Windows)
 ifndef SDL2_PREFIX
-SDL2_PREFIX:="C:/MinGW/usr"
+SDL2_PREFIX:="sdl/i686-w64-mingw32"
+endif
+ifndef GLEW_PREFIX
+GLEW_PREFIX:=glew
 endif
 ifndef GLEW32S_LIB
-GLEW32S_LIB=glew32s.lib
+GLEW32S_LIB:=$(GLEW_PREFIX)/lib/Release/Win32/glew32s.lib
 endif
 
 MEM:=mem_win.o
 TERMINAL:=terminal_win.o
 EXE:=.exe
-CC:=wine gcc.exe
-CFLAGS:=-std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -I"$(SDL2_PREFIX)/include/SDL2" -DGLEW_STATIC
+CC:=i686-w64-mingw32-gcc-win32
+CFLAGS:=-std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -I"$(SDL2_PREFIX)/include/SDL2" -I"$(GLEW_PREFIX)/include" -DGLEW_STATIC
 LDFLAGS:= $(GLEW32S_LIB) -L"$(SDL2_PREFIX)/lib" -lm -lmingw32 -lSDL2main -lSDL2 -lws2_32 -lopengl32 -lglu32 -mwindows
 CPU:=i686
 
--- a/menu.c	Sun Feb 26 20:50:03 2017 -0800
+++ b/menu.c	Sun Feb 26 23:18:21 2017 -0800
@@ -111,8 +111,13 @@
 
 #ifdef _WIN32
 #define localtime_r(a,b) localtime(a)
+//windows inclues seem not to like certain single letter defines from m68k_internal.h
+//get rid of them here
+#undef X
 #undef N
-#undef X
+#undef Z
+#undef V
+#undef C
 #include <windows.h>
 #endif