annotate libpurple/win32/global.mak @ 15470:015ad1283216

Some more changes to the win32 build to support cross-compiling.
author Daniel Atallah <daniel.atallah@gmail.com>
date Wed, 31 Jan 2007 04:31:12 +0000
parents f217a2d656c8
children ded8da3de5f8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
1 #
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
2 # global.mak
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
3 #
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
4 # This file should be included by all Makefile.mingw files for project
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
5 # wide definitions (after correctly defining GAIM_TOP).
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
6 #
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
7
15456
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
8 #include optional $(GAIM_TOP)/local.mak to allow overriding of any definitions
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
9 -include $(GAIM_TOP)/local.mak
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
10
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
11 # Locations of our various dependencies
15456
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
12 WIN32_DEV_TOP ?= $(GAIM_TOP)/../win32-dev
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
13 ASPELL_TOP ?= $(WIN32_DEV_TOP)/aspell-dev-0-50-3-3
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
14 GTKSPELL_TOP ?= $(WIN32_DEV_TOP)/gtkspell-2.0.6
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
15 GTK_TOP ?= $(WIN32_DEV_TOP)/gtk_2_0
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
16 GTK_BIN ?= $(GTK_TOP)/bin
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
17 HOWL_TOP ?= $(WIN32_DEV_TOP)/howl-1.0.0
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
18 LIBXML2_TOP ?= $(WIN32_DEV_TOP)/libxml2
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
19 MEANWHILE_TOP ?= $(WIN32_DEV_TOP)/meanwhile-1.0.2
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
20 NSPR_TOP ?= $(WIN32_DEV_TOP)/nspr-4.6.4
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
21 NSS_TOP ?= $(WIN32_DEV_TOP)/nss-3.11.4
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
22 PERL_LIB_TOP ?= $(WIN32_DEV_TOP)/perl58
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
23 SILC_TOOLKIT ?= $(WIN32_DEV_TOP)/silc-toolkit-1.0.2
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
24 TCL_LIB_TOP ?= $(WIN32_DEV_TOP)/tcl-8.4.5
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
25
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
26 # Where we installing this stuff to?
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
27 GAIM_INSTALL_DIR := $(GAIM_TOP)/win32-install-dir
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
28 GAIM_INSTALL_PERLMOD_DIR := $(GAIM_INSTALL_DIR)/perlmod
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
29 GAIM_INSTALL_PLUGINS_DIR := $(GAIM_INSTALL_DIR)/plugins
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
30 GAIM_INSTALL_PO_DIR := $(GAIM_INSTALL_DIR)/locale
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
31
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
32 # Important (enough) locations in our source code
15376
0e17470b47c2 Update win32 build for libpurple and pidgin renames. This compiles, but is far from complete.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 15373
diff changeset
33 GAIM_LIB_TOP := $(GAIM_TOP)/libpurple
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
34 GAIM_LIB_PLUGINS_TOP := $(GAIM_LIB_TOP)/plugins
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
35 GAIM_LIB_PERL_TOP := $(GAIM_LIB_PLUGINS_TOP)/perl
15376
0e17470b47c2 Update win32 build for libpurple and pidgin renames. This compiles, but is far from complete.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 15373
diff changeset
36 GAIM_GTK_TOP := $(GAIM_TOP)/pidgin
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
37 GAIM_GTK_IDLETRACK_TOP := $(GAIM_GTK_TOP)/win32/IdleTracker
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
38 GAIM_GTK_PIXMAPS_TOP := $(GAIM_GTK_TOP)/pixmaps
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
39 GAIM_GTK_PLUGINS_TOP := $(GAIM_GTK_TOP)/plugins
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
40 GAIM_GTK_SOUNDS_TOP := $(GAIM_GTK_TOP)/sounds
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
41 GAIM_PO_TOP := $(GAIM_TOP)/po
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
42 GAIM_PROTOS_TOP := $(GAIM_LIB_TOP)/protocols
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
43
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
44 # Locations of important (in-tree) build targets
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
45 GAIM_CONFIG_H := $(GAIM_TOP)/config.h
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
46 GAIM_IDLETRACK_DLL := $(GAIM_GTK_IDLETRACK_TOP)/idletrack.dll
15376
0e17470b47c2 Update win32 build for libpurple and pidgin renames. This compiles, but is far from complete.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 15373
diff changeset
47 GAIM_LIBGAIM_DLL := $(GAIM_LIB_TOP)/libpurple.dll
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
48 GAIM_LIBGAIM_PERL_DLL := $(GAIM_LIB_PERL_TOP)/perl.dll
15376
0e17470b47c2 Update win32 build for libpurple and pidgin renames. This compiles, but is far from complete.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 15373
diff changeset
49 GAIM_GTKGAIM_DLL := $(GAIM_GTK_TOP)/pidgin.dll
15456
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
50 GAIM_EXE := $(GAIM_GTK_TOP)/pidgin.exe
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
51 GAIM_PORTABLE_EXE := $(GAIM_GTK_TOP)/pidgin-portable.exe
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
52
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
53 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
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
54
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
55 # parse the version number from the configure.ac file if it is newer
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
56 #AC_INIT([gaim], [2.0.0dev], [gaim-devel@lists.sourceforge.net])
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
57 GAIM_VERSION := $(shell \
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
58 if [ ! $(GAIM_TOP)/VERSION -nt $(GAIM_TOP)/configure.ac ]; then \
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
59 awk 'BEGIN {FS="\\] *, *\\["} /^AC_INIT\(.+\)/ {printf("%s",$$2); exit}' \
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
60 $(GAIM_TOP)/configure.ac > $(GAIM_TOP)/VERSION; \
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
61 fi; \
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
62 cat $(GAIM_TOP)/VERSION \
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
63 )
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
64
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
65 DEFINES += -DVERSION=\"$(GAIM_VERSION)\" \
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
66 -DHAVE_CONFIG_H
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
67
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
68 # Use -g flag when building debug version of Gaim (including plugins).
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
69 # Use -fnative-struct instead of -mms-bitfields when using mingw 1.1
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
70 # (gcc 2.95)
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
71 CFLAGS += -O2 -Wall $(GCCWARNINGS) -pipe -mno-cygwin -mms-bitfields -g
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
72
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
73 # If not specified, dlls are built with the default base address of 0x10000000.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
74 # When loaded into a process address space a dll will be rebased if its base
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
75 # address colides with the base address of an existing dll. To avoid rebasing
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
76 # we do the following. Rebasing can slow down the load time of dlls and it
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
77 # also renders debug info useless.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
78 DLL_LD_FLAGS += -Wl,--enable-auto-image-base
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
79
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
80 # Build programs
15456
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
81 ifeq "$(origin CC)" "default"
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
82 CC := gcc.exe
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
83 endif
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
84 GMSGFMT ?= $(GTK_BIN)/msgfmt
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
85 MAKENSIS ?= makensis.exe
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
86 PERL ?= /cygdrive/c/perl/bin/perl
f217a2d656c8 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 <daniel.atallah@gmail.com>
parents: 15376
diff changeset
87 WINDRES ?= windres
15470
015ad1283216 Some more changes to the win32 build to support cross-compiling.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 15456
diff changeset
88 STRIP ?= strip
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
89
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
90 GAIM_COMMON_RULES := $(GAIM_LIB_TOP)/win32/rules.mak
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
91 GAIM_COMMON_TARGETS := $(GAIM_LIB_TOP)/win32/targets.mak
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
92 GAIM_WIN32_MAKEFILE := Makefile.mingw