libpurple/win32/global.mak

Fri, 09 Nov 2007 08:39:14 +0000

author
John Bailey <rekkanoryo@rekkanoryo.org>
date
Fri, 09 Nov 2007 08:39:14 +0000
branch
release-2.2.3
changeset 20288
5ca925a094e2
parent 20257
e52756e57259
child 20289
5c844288fbec
permissions
-rw-r--r--

applied changes from 03b709ec2a153e7e82719df0ba4635108bb1d3c6
through 32f31e981f0618a4167aa98bcc22c2dab13d1550

3711
7d99d1750885 [gaim-migrate @ 3844]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
1 #
7d99d1750885 [gaim-migrate @ 3844]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
2 # global.mak
7d99d1750885 [gaim-migrate @ 3844]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
3 #
7d99d1750885 [gaim-migrate @ 3844]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
4 # This file should be included by all Makefile.mingw files for project
16100
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
5 # wide definitions (after correctly defining PIDGIN_TREE_TOP).
3711
7d99d1750885 [gaim-migrate @ 3844]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
6 #
7d99d1750885 [gaim-migrate @ 3844]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
7
16100
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
8 #include optional $(PIDGIN_TREE_TOP)/local.mak to allow overriding of any definitions
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
9 -include $(PIDGIN_TREE_TOP)/local.mak
15517
c270a06133ae Add support for win32 makefile variable overriding using a "local.mak" file in the build root directory. This makes maintaining a custom build environment or cross-compiling easier.
Daniel Atallah <datallah@pidgin.im>
parents: 15438
diff changeset
10
14377
c0440e16bacd [gaim-migrate @ 17008]
Daniel Atallah <datallah@pidgin.im>
parents: 14286
diff changeset
11 # Locations of our various dependencies
16100
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
12 WIN32_DEV_TOP ?= $(PIDGIN_TREE_TOP)/../win32-dev
15517
c270a06133ae Add support for win32 makefile variable overriding using a "local.mak" file in the build root directory. This makes maintaining a custom build environment or cross-compiling easier.
Daniel Atallah <datallah@pidgin.im>
parents: 15438
diff changeset
13 ASPELL_TOP ?= $(WIN32_DEV_TOP)/aspell-dev-0-50-3-3
20240
3cad10595996 applied changes from 8548e491a5b470d5665cb1cf87a7b0caaa3c87a5
Luke Schierer <lschiere@pidgin.im>
parents: 19684
diff changeset
14 GTKSPELL_TOP ?= $(WIN32_DEV_TOP)/gtkspell-2.0.11-daa1
15517
c270a06133ae Add support for win32 makefile variable overriding using a "local.mak" file in the build root directory. This makes maintaining a custom build environment or cross-compiling easier.
Daniel Atallah <datallah@pidgin.im>
parents: 15438
diff changeset
15 GTK_TOP ?= $(WIN32_DEV_TOP)/gtk_2_0
c270a06133ae Add support for win32 makefile variable overriding using a "local.mak" file in the build root directory. This makes maintaining a custom build environment or cross-compiling easier.
Daniel Atallah <datallah@pidgin.im>
parents: 15438
diff changeset
16 GTK_BIN ?= $(GTK_TOP)/bin
17597
a6dcc19b180c More minor changes related to bonjour on win32.
Daniel Atallah <datallah@pidgin.im>
parents: 16663
diff changeset
17 BONJOUR_TOP ?= $(WIN32_DEV_TOP)/Bonjour_SDK
20257
e52756e57259 applied changes from d6da6a7a5ad01f170f0fd78424183f73200dc78c
Luke Schierer <lschiere@pidgin.im>
parents: 20240
diff changeset
18 LIBXML2_TOP ?= $(WIN32_DEV_TOP)/libxml2-2.6.30
15517
c270a06133ae Add support for win32 makefile variable overriding using a "local.mak" file in the build root directory. This makes maintaining a custom build environment or cross-compiling easier.
Daniel Atallah <datallah@pidgin.im>
parents: 15438
diff changeset
19 MEANWHILE_TOP ?= $(WIN32_DEV_TOP)/meanwhile-1.0.2
c270a06133ae Add support for win32 makefile variable overriding using a "local.mak" file in the build root directory. This makes maintaining a custom build environment or cross-compiling easier.
Daniel Atallah <datallah@pidgin.im>
parents: 15438
diff changeset
20 NSPR_TOP ?= $(WIN32_DEV_TOP)/nspr-4.6.4
c270a06133ae Add support for win32 makefile variable overriding using a "local.mak" file in the build root directory. This makes maintaining a custom build environment or cross-compiling easier.
Daniel Atallah <datallah@pidgin.im>
parents: 15438
diff changeset
21 NSS_TOP ?= $(WIN32_DEV_TOP)/nss-3.11.4
c270a06133ae Add support for win32 makefile variable overriding using a "local.mak" file in the build root directory. This makes maintaining a custom build environment or cross-compiling easier.
Daniel Atallah <datallah@pidgin.im>
parents: 15438
diff changeset
22 PERL_LIB_TOP ?= $(WIN32_DEV_TOP)/perl58
19684
cb06b0123bd5 Upgrade the win32 build to use version 1.1.2 of the SILC toolkit.
Daniel Atallah <datallah@pidgin.im>
parents: 19559
diff changeset
23 SILC_TOOLKIT ?= $(WIN32_DEV_TOP)/silc-toolkit-1.1.2
15517
c270a06133ae Add support for win32 makefile variable overriding using a "local.mak" file in the build root directory. This makes maintaining a custom build environment or cross-compiling easier.
Daniel Atallah <datallah@pidgin.im>
parents: 15438
diff changeset
24 TCL_LIB_TOP ?= $(WIN32_DEV_TOP)/tcl-8.4.5
20240
3cad10595996 applied changes from 8548e491a5b470d5665cb1cf87a7b0caaa3c87a5
Luke Schierer <lschiere@pidgin.im>
parents: 19684
diff changeset
25 GSTREAMER_TOP ?= $(WIN32_DEV_TOP)/gstreamer-0.10.13
14377
c0440e16bacd [gaim-migrate @ 17008]
Daniel Atallah <datallah@pidgin.im>
parents: 14286
diff changeset
26
c0440e16bacd [gaim-migrate @ 17008]
Daniel Atallah <datallah@pidgin.im>
parents: 14286
diff changeset
27 # Where we installing this stuff to?
16100
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
28 PIDGIN_INSTALL_DIR := $(PIDGIN_TREE_TOP)/win32-install-dir
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
29 PURPLE_INSTALL_DIR := $(PIDGIN_TREE_TOP)/win32-install-dir
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
30 PIDGIN_INSTALL_PERLMOD_DIR := $(PIDGIN_INSTALL_DIR)/perlmod
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
31 PIDGIN_INSTALL_PLUGINS_DIR := $(PIDGIN_INSTALL_DIR)/plugins
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
32 PURPLE_INSTALL_PERLMOD_DIR := $(PURPLE_INSTALL_DIR)/perlmod
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
33 PURPLE_INSTALL_PLUGINS_DIR := $(PURPLE_INSTALL_DIR)/plugins
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
34 PURPLE_INSTALL_PO_DIR := $(PURPLE_INSTALL_DIR)/locale
14377
c0440e16bacd [gaim-migrate @ 17008]
Daniel Atallah <datallah@pidgin.im>
parents: 14286
diff changeset
35
c0440e16bacd [gaim-migrate @ 17008]
Daniel Atallah <datallah@pidgin.im>
parents: 14286
diff changeset
36 # Important (enough) locations in our source code
16100
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
37 PURPLE_TOP := $(PIDGIN_TREE_TOP)/libpurple
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
38 PURPLE_PLUGINS_TOP := $(PURPLE_TOP)/plugins
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
39 PURPLE_PERL_TOP := $(PURPLE_PLUGINS_TOP)/perl
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
40 PIDGIN_TOP := $(PIDGIN_TREE_TOP)/pidgin
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
41 PIDGIN_IDLETRACK_TOP := $(PIDGIN_TOP)/win32/IdleTracker
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
42 PIDGIN_PIXMAPS_TOP := $(PIDGIN_TOP)/pixmaps
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
43 PIDGIN_PLUGINS_TOP := $(PIDGIN_TOP)/plugins
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
44 PURPLE_PO_TOP := $(PIDGIN_TREE_TOP)/po
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
45 PURPLE_PROTOS_TOP := $(PURPLE_TOP)/protocols
14377
c0440e16bacd [gaim-migrate @ 17008]
Daniel Atallah <datallah@pidgin.im>
parents: 14286
diff changeset
46
c0440e16bacd [gaim-migrate @ 17008]
Daniel Atallah <datallah@pidgin.im>
parents: 14286
diff changeset
47 # Locations of important (in-tree) build targets
16100
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
48 PIDGIN_CONFIG_H := $(PIDGIN_TREE_TOP)/config.h
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
49 PURPLE_CONFIG_H := $(PIDGIN_TREE_TOP)/config.h
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
50 PIDGIN_IDLETRACK_DLL := $(PIDGIN_IDLETRACK_TOP)/idletrack.dll
16663
bcc4caec2e29 Fix version.h generation on mingw build.
Daniel Atallah <datallah@pidgin.im>
parents: 16651
diff changeset
51 PURPLE_VERSION_H := $(PURPLE_TOP)/version.h
16100
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
52 PURPLE_DLL := $(PURPLE_TOP)/libpurple.dll
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
53 PURPLE_PERL_DLL := $(PURPLE_PERL_TOP)/perl.dll
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
54 PIDGIN_DLL := $(PIDGIN_TOP)/pidgin.dll
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
55 PIDGIN_EXE := $(PIDGIN_TOP)/pidgin.exe
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
56 PIDGIN_PORTABLE_EXE := $(PIDGIN_TOP)/pidgin-portable.exe
3711
7d99d1750885 [gaim-migrate @ 3844]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
57
14286
9ff15ceacd34 [gaim-migrate @ 16905]
Daniel Atallah <datallah@pidgin.im>
parents: 14253
diff changeset
58 GCCWARNINGS := -Waggregate-return -Wcast-align -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wextra -Wno-sign-compare -Wno-unused-parameter -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wundef
14517
970b4c731ac9 [gaim-migrate @ 17169]
Daniel Atallah <datallah@pidgin.im>
parents: 14509
diff changeset
59
970b4c731ac9 [gaim-migrate @ 17169]
Daniel Atallah <datallah@pidgin.im>
parents: 14509
diff changeset
60 # parse the version number from the configure.ac file if it is newer
16651
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 16100
diff changeset
61 #m4_define([purple_major_version], [2])
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 16100
diff changeset
62 #m4_define([purple_minor_version], [0])
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 16100
diff changeset
63 #m4_define([purple_micro_version], [0])
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 16100
diff changeset
64 #m4_define([purple_version_suffix], [devel])
16100
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
65 PIDGIN_VERSION := $(shell \
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
66 if [ ! $(PIDGIN_TREE_TOP)/VERSION -nt $(PIDGIN_TREE_TOP)/configure.ac ]; then \
16651
218fe51ae7b7 soname versioning of libpurple. Should help resolve debian bug 421282
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 16100
diff changeset
67 awk 'BEGIN {FS="[\\(\\)\\[\\]]"} /^m4_define..purple_(major|minor)_version/ {printf("%s.",$$5);} /^m4_define..purple_micro_version/ {printf("%s",$$5);} /^m4_define..purple_version_suffix/ {printf("%s",$$5); exit}' \
16100
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
68 $(PIDGIN_TREE_TOP)/configure.ac > $(PIDGIN_TREE_TOP)/VERSION; \
14517
970b4c731ac9 [gaim-migrate @ 17169]
Daniel Atallah <datallah@pidgin.im>
parents: 14509
diff changeset
69 fi; \
16100
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
70 cat $(PIDGIN_TREE_TOP)/VERSION \
14517
970b4c731ac9 [gaim-migrate @ 17169]
Daniel Atallah <datallah@pidgin.im>
parents: 14509
diff changeset
71 )
16100
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
72 PURPLE_VERSION := $(PIDGIN_VERSION)
14517
970b4c731ac9 [gaim-migrate @ 17169]
Daniel Atallah <datallah@pidgin.im>
parents: 14509
diff changeset
73
16100
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
74 DEFINES += -DVERSION=\"$(PIDGIN_VERSION)\" \
20288
5ca925a094e2 applied changes from 03b709ec2a153e7e82719df0ba4635108bb1d3c6
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20257
diff changeset
75 -DDISPLAY_VERSION=\"$(PIDGIN_VERSION)\" \
14377
c0440e16bacd [gaim-migrate @ 17008]
Daniel Atallah <datallah@pidgin.im>
parents: 14286
diff changeset
76 -DHAVE_CONFIG_H
14286
9ff15ceacd34 [gaim-migrate @ 16905]
Daniel Atallah <datallah@pidgin.im>
parents: 14253
diff changeset
77
16100
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
78 # Use -g flag when building debug version of Pidgin (including plugins).
7242
d91a60e1095c [gaim-migrate @ 7817]
Herman Bloggs <herman@bluedigits.com>
parents: 5932
diff changeset
79 # Use -fnative-struct instead of -mms-bitfields when using mingw 1.1
d91a60e1095c [gaim-migrate @ 7817]
Herman Bloggs <herman@bluedigits.com>
parents: 5932
diff changeset
80 # (gcc 2.95)
14286
9ff15ceacd34 [gaim-migrate @ 16905]
Daniel Atallah <datallah@pidgin.im>
parents: 14253
diff changeset
81 CFLAGS += -O2 -Wall $(GCCWARNINGS) -pipe -mno-cygwin -mms-bitfields -g
9ff15ceacd34 [gaim-migrate @ 16905]
Daniel Atallah <datallah@pidgin.im>
parents: 14253
diff changeset
82
5932
989a2714d78e [gaim-migrate @ 6372]
Herman Bloggs <herman@bluedigits.com>
parents: 4860
diff changeset
83 # If not specified, dlls are built with the default base address of 0x10000000.
989a2714d78e [gaim-migrate @ 6372]
Herman Bloggs <herman@bluedigits.com>
parents: 4860
diff changeset
84 # When loaded into a process address space a dll will be rebased if its base
989a2714d78e [gaim-migrate @ 6372]
Herman Bloggs <herman@bluedigits.com>
parents: 4860
diff changeset
85 # address colides with the base address of an existing dll. To avoid rebasing
989a2714d78e [gaim-migrate @ 6372]
Herman Bloggs <herman@bluedigits.com>
parents: 4860
diff changeset
86 # we do the following. Rebasing can slow down the load time of dlls and it
989a2714d78e [gaim-migrate @ 6372]
Herman Bloggs <herman@bluedigits.com>
parents: 4860
diff changeset
87 # also renders debug info useless.
989a2714d78e [gaim-migrate @ 6372]
Herman Bloggs <herman@bluedigits.com>
parents: 4860
diff changeset
88 DLL_LD_FLAGS += -Wl,--enable-auto-image-base
989a2714d78e [gaim-migrate @ 6372]
Herman Bloggs <herman@bluedigits.com>
parents: 4860
diff changeset
89
14377
c0440e16bacd [gaim-migrate @ 17008]
Daniel Atallah <datallah@pidgin.im>
parents: 14286
diff changeset
90 # Build programs
15517
c270a06133ae Add support for win32 makefile variable overriding using a "local.mak" file in the build root directory. This makes maintaining a custom build environment or cross-compiling easier.
Daniel Atallah <datallah@pidgin.im>
parents: 15438
diff changeset
91 ifeq "$(origin CC)" "default"
c270a06133ae Add support for win32 makefile variable overriding using a "local.mak" file in the build root directory. This makes maintaining a custom build environment or cross-compiling easier.
Daniel Atallah <datallah@pidgin.im>
parents: 15438
diff changeset
92 CC := gcc.exe
c270a06133ae Add support for win32 makefile variable overriding using a "local.mak" file in the build root directory. This makes maintaining a custom build environment or cross-compiling easier.
Daniel Atallah <datallah@pidgin.im>
parents: 15438
diff changeset
93 endif
c270a06133ae Add support for win32 makefile variable overriding using a "local.mak" file in the build root directory. This makes maintaining a custom build environment or cross-compiling easier.
Daniel Atallah <datallah@pidgin.im>
parents: 15438
diff changeset
94 GMSGFMT ?= $(GTK_BIN)/msgfmt
c270a06133ae Add support for win32 makefile variable overriding using a "local.mak" file in the build root directory. This makes maintaining a custom build environment or cross-compiling easier.
Daniel Atallah <datallah@pidgin.im>
parents: 15438
diff changeset
95 MAKENSIS ?= makensis.exe
c270a06133ae Add support for win32 makefile variable overriding using a "local.mak" file in the build root directory. This makes maintaining a custom build environment or cross-compiling easier.
Daniel Atallah <datallah@pidgin.im>
parents: 15438
diff changeset
96 PERL ?= /cygdrive/c/perl/bin/perl
c270a06133ae Add support for win32 makefile variable overriding using a "local.mak" file in the build root directory. This makes maintaining a custom build environment or cross-compiling easier.
Daniel Atallah <datallah@pidgin.im>
parents: 15438
diff changeset
97 WINDRES ?= windres
15533
1787d1216249 Some more changes to the win32 build to support cross-compiling.
Daniel Atallah <datallah@pidgin.im>
parents: 15517
diff changeset
98 STRIP ?= strip
3711
7d99d1750885 [gaim-migrate @ 3844]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
99
16100
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
100 PIDGIN_COMMON_RULES := $(PURPLE_TOP)/win32/rules.mak
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
101 PIDGIN_COMMON_TARGETS := $(PURPLE_TOP)/win32/targets.mak
a0ab70986c10 This should get all the Win32 Makefiles in line with
Kevin Stange <kstange@pidgin.im>
parents: 15533
diff changeset
102 MINGW_MAKEFILE := Makefile.mingw

mercurial