Mercurial > repos > blastem
diff Makefile @ 1828:37afb9cf58be
Get 64-bit builds working for Windows target
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 07 Apr 2019 00:06:29 -0700 |
parents | d2ba1921e946 |
children | 3d0b20e9a187 49f65d240299 |
line wrap: on
line diff
--- a/Makefile Sat Apr 06 21:38:11 2019 -0700 +++ b/Makefile Sun Apr 07 00:06:29 2019 -0700 @@ -10,16 +10,8 @@ zlib/gzwrite.o zlib/infback.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o zlib/uncompr.o zlib/zutil.o ifeq ($(OS),Windows) -ifndef SDL2_PREFIX -SDL2_PREFIX:="sdl/i686-w64-mingw32" -endif -ifndef GLEW_PREFIX + GLEW_PREFIX:=glew -endif -ifndef GLEW32S_LIB -GLEW32S_LIB:=$(GLEW_PREFIX)/lib/Release/Win32/glew32s.lib -endif - MEM:=mem_win.o TERMINAL:=terminal_win.o FONT:=nuklear_ui/font_win.o @@ -29,9 +21,16 @@ CPU:=i686 ifeq ($(CPU),i686) CC:=i686-w64-mingw32-gcc-win32 +WINDRES:=i686-w64-mingw32-windres +GLUDIR:=Win32 +SDL2_PREFIX:="sdl/i686-w64-mingw32" else CC:=x86_64-w64-mingw32-gcc-win32 +WINDRES:=x86_64-w64-mingw32-windres +SDL2_PREFIX:="sdl/x86_64-w64-mingw32" +GLUDIR:=x64 endif +GLEW32S_LIB:=$(GLEW_PREFIX)/lib/Release/$(GLUDIR)/glew32s.lib CFLAGS:=-std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration LDFLAGS:=-lm -lmingw32 -lws2_32 -mwindows ifneq ($(MAKECMDGOALS),libblastem.dll) @@ -365,7 +364,7 @@ %.bin : %.sz8 vasmz80_mot -Fbin -spaces -o $@ $< res.o : blastem.rc - i686-w64-mingw32-windres blastem.rc res.o + $(WINDRES) blastem.rc res.o arrow.tiles : arrow.png cursor.tiles : cursor.png