# HG changeset patch # User Matti Hamalainen # Date 1363375924 -7200 # Node ID 702fb015c844bdf21b881d893a20b3561106a651 # Parent c57df9d210071aca448e677376fb183c59a4ce66 Add mingw32 crossbuild Makefile for win32 target. diff -r c57df9d21007 -r 702fb015c844 Makefile.gwin --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile.gwin Fri Mar 15 21:32:04 2013 +0200 @@ -0,0 +1,27 @@ +# +# Generic Windows cross-compilation with MinGW suite @ Linux +# (included from Makefile.w32/w64) +# + +# C-compiler, flags and linker flags +CC=$(MINGW_PREFIX)gcc +AR=$(MINGW_PREFIX)ar +RANLIB=$(MINGW_PREFIX)ranlib +RM=rm + +SDL_CFLAGS=`$(MINGW_PATH)/bin/sdl-config --cflags` +SDL_LDFLAGS:=`$(MINGW_PATH)/bin/sdl-config --libs` + +CFLAGS = -O3 -march=pentium-m -g -W -Wall $(SDL_CFLAGS) +LDFLAGS = -lm -lmingw32 $(SDL_LDFLAGS) -lSDL + + +3x666$(EXEEXT): 3x666.o + $(CC) -o $@ $+ $(LDFLAGS) + +3x666.o: 3x666.c config.h 3xfont.h + $(CC) $(CFLAGS) -c -o $@ $< + +clean: + $(RM) 3x666.o 3x666$(EXEEXT) + diff -r c57df9d21007 -r 702fb015c844 Makefile.w32 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile.w32 Fri Mar 15 21:32:04 2013 +0200 @@ -0,0 +1,9 @@ +# +# For win32 version cross-compilation with MinGW suite @ Linux +# +MINGW_PREFIX=i686-w64-mingw32- +MINGW_PATH=/usr/i686-w64-mingw32 + +EXEEXT ?= .exe + +include Makefile.gwin