comparison Makefile.w32 @ 195:829457be9eea

Build system changes to support (in a big kludgy manner) icon and version information resource generation for Win32 binaries.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 17 Nov 2010 04:09:41 +0200
parents f265e7274a45
children e0ec2280a778
comparison
equal deleted inserted replaced
194:0751e0fb7ba9 195:829457be9eea
1 # 1 #
2 # For win32 version cross-compilation with MinGW suite @ Linux 2 # For win32 version cross-compilation with MinGW suite @ Linux
3 # 3 #
4 SDL=y
4 5
5 # Set PATH to include MinGW cross compiler path FIRST! 6 # Set PATH to include MinGW cross compiler path FIRST!
6 PATH=/usr/local/i386-mingw32/bin:/usr/bin:/bin 7 PATH=/usr/local/i386-mingw32/bin:/usr/bin:/bin:/usr/local/bin
7 8
8 # C-compiler, flags and linker flags 9 # C-compiler, flags and linker flags
9 CC=gcc 10 CC=gcc
10 CFLAGS=-DHAVE_STRING_H -Ipdcurses 11 CFLAGS=-DHAVE_STRING_H -Ipdcurses
11 12
23 EXEEXT=.exe 24 EXEEXT=.exe
24 OBJPATH=./win32/ 25 OBJPATH=./win32/
25 BINPATH=./win32/ 26 BINPATH=./win32/
26 #BINPATH=/misc/wine_c/ 27 #BINPATH=/misc/wine_c/
27 NONBUILD=$(OBJPATH) 28 NONBUILD=$(OBJPATH)
29 EXTRAOBJS= resource.o
30 ICON=resource.ico
28 31
29 include Makefile.gen 32 include Makefile.gen
30 33
31 $(OBJPATH): 34 $(OBJPATH):
32 mkdir $@ 35 mkdir $@
36
37 comma:= ,
38
39 resource.rc: resource.rc.in $(ICON)
40 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" < $< > $@
41
42 resource.o: resource.rc
43 i386-mingw32-windres $< -O coff -o $@