Mercurial > hg > nnchat
annotate 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 |
rev | line source |
---|---|
0 | 1 # |
158
a06d27141c26
Add some comments in Win32 MinGW cross build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
119
diff
changeset
|
2 # For win32 version cross-compilation with MinGW suite @ Linux |
0 | 3 # |
195
829457be9eea
Build system changes to support (in a big kludgy manner) icon and version information resource generation for Win32 binaries.
Matti Hamalainen <ccr@tnsp.org>
parents:
176
diff
changeset
|
4 SDL=y |
158
a06d27141c26
Add some comments in Win32 MinGW cross build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
119
diff
changeset
|
5 |
a06d27141c26
Add some comments in Win32 MinGW cross build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
119
diff
changeset
|
6 # Set PATH to include MinGW cross compiler path FIRST! |
195
829457be9eea
Build system changes to support (in a big kludgy manner) icon and version information resource generation for Win32 binaries.
Matti Hamalainen <ccr@tnsp.org>
parents:
176
diff
changeset
|
7 PATH=/usr/local/i386-mingw32/bin:/usr/bin:/bin:/usr/local/bin |
0 | 8 |
9 # C-compiler, flags and linker flags | |
10 CC=gcc | |
68
3ab7751fdad1
MingW compatibility, with one ugly kludge.
Matti Hamalainen <ccr@tnsp.org>
parents:
64
diff
changeset
|
11 CFLAGS=-DHAVE_STRING_H -Ipdcurses |
158
a06d27141c26
Add some comments in Win32 MinGW cross build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
119
diff
changeset
|
12 |
a06d27141c26
Add some comments in Win32 MinGW cross build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
119
diff
changeset
|
13 # Library path must be defined correctly here |
119
4bc63a535acb
Fix some PDCurses incompatibilities and remove some Win32/PDCurses specific hacks.
Matti Hamalainen <ccr@tnsp.org>
parents:
110
diff
changeset
|
14 LDFLAGS=-L/usr/local/i386-mingw32/lib/ -lmingw32 -liberty -lws2_32 -s |
4bc63a535acb
Fix some PDCurses incompatibilities and remove some Win32/PDCurses specific hacks.
Matti Hamalainen <ccr@tnsp.org>
parents:
110
diff
changeset
|
15 |
158
a06d27141c26
Add some comments in Win32 MinGW cross build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
119
diff
changeset
|
16 # Link PDCurses static library here .. you will want to change this |
119
4bc63a535acb
Fix some PDCurses incompatibilities and remove some Win32/PDCurses specific hacks.
Matti Hamalainen <ccr@tnsp.org>
parents:
110
diff
changeset
|
17 ifeq ($(SDL),y) |
4bc63a535acb
Fix some PDCurses incompatibilities and remove some Win32/PDCurses specific hacks.
Matti Hamalainen <ccr@tnsp.org>
parents:
110
diff
changeset
|
18 LDFLAGS+=pdcurses/libpdcurses-sdl.a -lSDL |
4bc63a535acb
Fix some PDCurses incompatibilities and remove some Win32/PDCurses specific hacks.
Matti Hamalainen <ccr@tnsp.org>
parents:
110
diff
changeset
|
19 else |
4bc63a535acb
Fix some PDCurses incompatibilities and remove some Win32/PDCurses specific hacks.
Matti Hamalainen <ccr@tnsp.org>
parents:
110
diff
changeset
|
20 LDFLAGS+=pdcurses/libpdcurses.a |
4bc63a535acb
Fix some PDCurses incompatibilities and remove some Win32/PDCurses specific hacks.
Matti Hamalainen <ccr@tnsp.org>
parents:
110
diff
changeset
|
21 endif |
0 | 22 |
23 # Miscellaneous | |
24 EXEEXT=.exe | |
87 | 25 OBJPATH=./win32/ |
158
a06d27141c26
Add some comments in Win32 MinGW cross build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
119
diff
changeset
|
26 BINPATH=./win32/ |
a06d27141c26
Add some comments in Win32 MinGW cross build Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents:
119
diff
changeset
|
27 #BINPATH=/misc/wine_c/ |
176
f265e7274a45
Add a 'NONBUILD' target list for non-builded targets, use it for win32 subdir creation.
Matti Hamalainen <ccr@tnsp.org>
parents:
159
diff
changeset
|
28 NONBUILD=$(OBJPATH) |
195
829457be9eea
Build system changes to support (in a big kludgy manner) icon and version information resource generation for Win32 binaries.
Matti Hamalainen <ccr@tnsp.org>
parents:
176
diff
changeset
|
29 EXTRAOBJS= resource.o |
829457be9eea
Build system changes to support (in a big kludgy manner) icon and version information resource generation for Win32 binaries.
Matti Hamalainen <ccr@tnsp.org>
parents:
176
diff
changeset
|
30 ICON=resource.ico |
0 | 31 |
32 include Makefile.gen | |
159
1b6bc8bf6ac3
Create win32/ subdirectory if needed.
Matti Hamalainen <ccr@tnsp.org>
parents:
158
diff
changeset
|
33 |
1b6bc8bf6ac3
Create win32/ subdirectory if needed.
Matti Hamalainen <ccr@tnsp.org>
parents:
158
diff
changeset
|
34 $(OBJPATH): |
1b6bc8bf6ac3
Create win32/ subdirectory if needed.
Matti Hamalainen <ccr@tnsp.org>
parents:
158
diff
changeset
|
35 mkdir $@ |
195
829457be9eea
Build system changes to support (in a big kludgy manner) icon and version information resource generation for Win32 binaries.
Matti Hamalainen <ccr@tnsp.org>
parents:
176
diff
changeset
|
36 |
829457be9eea
Build system changes to support (in a big kludgy manner) icon and version information resource generation for Win32 binaries.
Matti Hamalainen <ccr@tnsp.org>
parents:
176
diff
changeset
|
37 comma:= , |
829457be9eea
Build system changes to support (in a big kludgy manner) icon and version information resource generation for Win32 binaries.
Matti Hamalainen <ccr@tnsp.org>
parents:
176
diff
changeset
|
38 |
829457be9eea
Build system changes to support (in a big kludgy manner) icon and version information resource generation for Win32 binaries.
Matti Hamalainen <ccr@tnsp.org>
parents:
176
diff
changeset
|
39 resource.rc: resource.rc.in $(ICON) |
829457be9eea
Build system changes to support (in a big kludgy manner) icon and version information resource generation for Win32 binaries.
Matti Hamalainen <ccr@tnsp.org>
parents:
176
diff
changeset
|
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" < $< > $@ |
829457be9eea
Build system changes to support (in a big kludgy manner) icon and version information resource generation for Win32 binaries.
Matti Hamalainen <ccr@tnsp.org>
parents:
176
diff
changeset
|
41 |
829457be9eea
Build system changes to support (in a big kludgy manner) icon and version information resource generation for Win32 binaries.
Matti Hamalainen <ccr@tnsp.org>
parents:
176
diff
changeset
|
42 resource.o: resource.rc |
829457be9eea
Build system changes to support (in a big kludgy manner) icon and version information resource generation for Win32 binaries.
Matti Hamalainen <ccr@tnsp.org>
parents:
176
diff
changeset
|
43 i386-mingw32-windres $< -O coff -o $@ |