view Makefile.w32 @ 199:5ef630818bef

Get version number from external file 'VERSION'.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 18 Nov 2010 01:27:03 +0200
parents e0ec2280a778
children 78f47ae47c2a
line wrap: on
line source

#
# For win32 version cross-compilation with MinGW suite @ Linux
#
SDL=y

# Set PATH to include MinGW cross compiler path FIRST!
PATH=/usr/local/i386-mingw32/bin:/usr/bin:/bin:/usr/local/bin

# C-compiler, flags and linker flags
CC=gcc
CFLAGS=-DHAVE_STRING_H -Ipdcurses

# Library path must be defined correctly here
LDFLAGS=-L/usr/local/i386-mingw32/lib/ -liberty -lws2_32 -lole32 -s

# Link PDCurses static library here .. you will want to change this
ifeq ($(SDL),y)
LDFLAGS+=pdcurses/libpdcurses-sdl.a -lSDL
else
LDFLAGS+=pdcurses/libpdcurses.a
endif

# Miscellaneous
EXEEXT=.exe
OBJPATH=./win32/
BINPATH=./win32/
#BINPATH=/misc/wine_c/
NONBUILD=$(OBJPATH)

EXTRAOBJS= resource.o
ICON=resource.ico

include Makefile.gen

$(OBJPATH):
	mkdir $@

comma:= ,

resource.rc: resource.rc.in $(ICON)
	sed -e "s/@VERSION@/$(NN_VERSION)/g;s/@VERSION_COM@/$(subst .,$(comma),$(NN_VERSION))/g;s/@ICON@/$(ICON)/g;s#@EXE@#$(notdir $(NNCHAT_BIN))#g" < $< > $@

resource.o: resource.rc
	i386-mingw32-windres $< -O coff -o $@