# HG changeset patch # User Michael Pavone # Date 1488179901 28800 # Node ID 0a34e31c4fd0393784dec937531f89c53b3fc127 # Parent 50700d370a333b576b72bf2c8f15a2d1686a6fc3 Update Windows build to use mingw-w64 cross compiler rather than Wine diff -r 50700d370a33 -r 0a34e31c4fd0 Makefile --- 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 diff -r 50700d370a33 -r 0a34e31c4fd0 menu.c --- 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 #endif