annotate Makefile.w32 @ 354:c01e42fc9adb

More work on SOCKS proxy support, should work now.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 23 Jun 2011 08:26:48 +0300
parents b18b97d3e4f5
children 4e178dfd0cc3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 # C-compiler, flags and linker flags
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 CC=gcc
269
1cb8c2aa1ee7 Compile MinGW/Windows version as -mwindows and not as a console application.
Matti Hamalainen <ccr@tnsp.org>
parents: 227
diff changeset
11 CFLAGS=-DHAVE_STRING_H -Ipdcurses -mwindows
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
269
1cb8c2aa1ee7 Compile MinGW/Windows version as -mwindows and not as a console application.
Matti Hamalainen <ccr@tnsp.org>
parents: 227
diff changeset
14 LDFLAGS=-L/usr/local/i386-mingw32/lib/ -liberty -lws2_32 -lole32 -s -mwindows
119
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
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23 # Miscellaneous
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24 EXEEXT=.exe
87
9140c33296a8 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 83
diff changeset
25 OBJPATH=./win32/
227
714b1919e1be Change build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents: 213
diff changeset
26 BINPATH=./installer/
158
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)
199
5ef630818bef Get version number from external file 'VERSION'.
Matti Hamalainen <ccr@tnsp.org>
parents: 197
diff changeset
29
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
30 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
31 ICON=resource.ico
0
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 include Makefile.gen
159
1b6bc8bf6ac3 Create win32/ subdirectory if needed.
Matti Hamalainen <ccr@tnsp.org>
parents: 158
diff changeset
34
1b6bc8bf6ac3 Create win32/ subdirectory if needed.
Matti Hamalainen <ccr@tnsp.org>
parents: 158
diff changeset
35 $(OBJPATH):
1b6bc8bf6ac3 Create win32/ subdirectory if needed.
Matti Hamalainen <ccr@tnsp.org>
parents: 158
diff changeset
36 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
37
213
78f47ae47c2a Fix Windows build.
Matti Hamalainen <ccr@tnsp.org>
parents: 199
diff changeset
38 resource.rc: resource.rc.in $(ICON) VERSION
78f47ae47c2a Fix Windows build.
Matti Hamalainen <ccr@tnsp.org>
parents: 199
diff changeset
39 sed -e "s/@VERSION@/$(NN_VERSION)/g;s/@VERSION_COM@/$(NN_VERSION_COM)/g;s/@ICON@/$(ICON)/g;s#@EXE@#$(notdir $(NNCHAT_BIN))#g" < $< > $@
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
40
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 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
42 i386-mingw32-windres $< -O coff -o $@
227
714b1919e1be Change build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents: 213
diff changeset
43
337
386a9febfa73 Improvements in Windows Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 269
diff changeset
44
386a9febfa73 Improvements in Windows Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 269
diff changeset
45 DOC=$(BINPATH)/README.html
227
714b1919e1be Change build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents: 213
diff changeset
46
337
386a9febfa73 Improvements in Windows Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 269
diff changeset
47 update-doc:
386a9febfa73 Improvements in Windows Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 269
diff changeset
48 @wget -O- http://www.tnsp.org/~ccr/nnchat/ | tr '\n' '§' | sed "s/<.-- BEGIN -->.*<.-- END -->//g" | tr '§' '\n' > $(DOC).new
351
b18b97d3e4f5 Suppress diff output in Makefile.w32 when generating documentation.
Matti Hamalainen <ccr@tnsp.org>
parents: 337
diff changeset
49 @if diff -u $(DOC) $(DOC).new > /dev/null; then cp $(DOC).new $(DOC); fi
337
386a9febfa73 Improvements in Windows Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 269
diff changeset
50
386a9febfa73 Improvements in Windows Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 269
diff changeset
51 $(DOC): update-doc
386a9febfa73 Improvements in Windows Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 269
diff changeset
52
386a9febfa73 Improvements in Windows Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 269
diff changeset
53 upload: $(BINPATH)/nncsetup.msi $(DOC)
386a9febfa73 Improvements in Windows Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 269
diff changeset
54 @scp $< ccr@tnsp.org:public_html/nnchat/
386a9febfa73 Improvements in Windows Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 269
diff changeset
55 touch $@