view Makefile.gwin @ 23:702fb015c844

Add mingw32 crossbuild Makefile for win32 target.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 15 Mar 2013 21:32:04 +0200
parents
children f896fe6a98da
line wrap: on
line source

#
# 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)