4 # This file should be included by all Makefile.mingw files for project
5 # wide definitions (after correctly defining PIDGIN_TREE_TOP).
8 #include optional $(PIDGIN_TREE_TOP)/local.mak to allow overriding of any definitions
9 -include $(PIDGIN_TREE_TOP
)/local.mak
11 # TODO: we should do parsing like for PURPLE_VERSION, if we won't drop
12 # Makefile.mingw files before 3.0.0 release
13 PURPLE_MAJOR_VERSION
:= 3
14 PURPLE_MINOR_VERSION
:= 0
15 PURPLE_MICRO_VERSION
:= 0
16 PURPLE_API_VERSION
:= 20
18 # Locations of our various dependencies
19 WIN32_DEV_TOP ?
= $(PIDGIN_TREE_TOP
)/..
/win32-dev
20 ENCHANT_TOP ?
= $(WIN32_DEV_TOP
)/enchant-1.6
21 GNUTLS_TOP ?
= $(WIN32_DEV_TOP
)/gnutls-3.1
22 GTK_TOP ?
= $(WIN32_DEV_TOP
)/gtk2-2.24
23 GTK_BIN ?
= $(GTK_TOP
)/bin
24 JSON_GLIB_TOP ?
= $(WIN32_DEV_TOP
)/json-glib-0.14
25 LIBXML2_TOP ?
= $(WIN32_DEV_TOP
)/libxml2-2.9
.2_daa1
26 MEANWHILE_TOP ?
= $(WIN32_DEV_TOP
)/meanwhile-1.0
.2_daa3
27 NSS_TOP ?
= $(WIN32_DEV_TOP
)/nss-3.24
-nspr-4.12
28 SILC_TOOLKIT ?
= $(WIN32_DEV_TOP
)/silc-toolkit-1.1
.12
29 GSTREAMER_TOP ?
= $(WIN32_DEV_TOP
)/gstreamer-0.10
.13
30 GCC_SSP_TOP ?
= $(shell dirname
$(shell which
$(CC
)))
31 CYRUS_SASL_TOP ?
= $(WIN32_DEV_TOP
)/cyrus-sasl-2.1
32 WEBKITGTK_TOP ?
= $(WIN32_DEV_TOP
)/libwebkitgtk-1.10
33 LIBSOUP_TOP ?
= $(WIN32_DEV_TOP
)/libsoup-2.42
34 GETTEXT_TOP ?
= $(WIN32_DEV_TOP
)/gettext-0.18
35 INTLTOOL_TOP ?
= $(WIN32_DEV_TOP
)/intltool-0.50
36 LIBGADU_TOP ?
= $(WIN32_DEV_TOP
)/libgadu-1.12
38 # Where we installing this stuff to?
39 PIDGIN_INSTALL_DIR
:= $(PIDGIN_TREE_TOP
)/win32-install-dir
40 PURPLE_INSTALL_DIR
:= $(PIDGIN_TREE_TOP
)/win32-install-dir
41 PIDGIN_INSTALL_PLUGINS_DIR
:= $(PIDGIN_INSTALL_DIR
)/plugins
42 PURPLE_INSTALL_PLUGINS_DIR
:= $(PURPLE_INSTALL_DIR
)/plugins
43 PURPLE_INSTALL_PO_DIR
:= $(PURPLE_INSTALL_DIR
)/locale
45 # Important (enough) locations in our source code
46 PURPLE_TOP
:= $(PIDGIN_TREE_TOP
)/libpurple
47 PURPLE_PLUGINS_TOP
:= $(PURPLE_TOP
)/plugins
48 PIDGIN_TOP
:= $(PIDGIN_TREE_TOP
)/pidgin
49 PIDGIN_PIXMAPS_TOP
:= $(PIDGIN_TOP
)/pixmaps
50 PIDGIN_PLUGINS_TOP
:= $(PIDGIN_TOP
)/plugins
51 PURPLE_PO_TOP
:= $(PIDGIN_TREE_TOP
)/po
52 PURPLE_PROTOS_TOP
:= $(PURPLE_TOP
)/protocols
54 # Locations of important (in-tree) build targets
55 PIDGIN_CONFIG_H
:= $(PIDGIN_TREE_TOP
)/config.h
56 PURPLE_CONFIG_H
:= $(PIDGIN_TREE_TOP
)/config.h
57 PIDGIN_REVISION_H
:= $(PIDGIN_TREE_TOP
)/package_revision.h
58 PIDGIN_REVISION_RAW_TXT
:= $(PIDGIN_TREE_TOP
)/package_revision_raw.txt
59 PURPLE_PURPLE_H
:= $(PURPLE_TOP
)/purple.h
60 PURPLE_VERSION_H
:= $(PURPLE_TOP
)/version.h
61 PURPLE_DLL
:= $(PURPLE_TOP
)/libpurple.dll
62 PIDGIN_DLL
:= $(PIDGIN_TOP
)/pidgin.dll
63 PIDGIN_EXE
:= $(PIDGIN_TOP
)/pidgin.exe
64 PIDGIN_PORTABLE_EXE
:= $(PIDGIN_TOP
)/pidgin-portable.exe
66 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
68 CC_HARDENING_OPTIONS ?
= -Wstack-protector
-fwrapv
-fno-strict-overflow
-Wno-missing-field-initializers
-Wformat-security
-fstack-protector-all
--param ssp-buffer-size
=1
69 LD_HARDENING_OPTIONS ?
= -Wl
,--dynamicbase
-Wl
,--nxcompat
71 TAG
:= @
$(PURPLE_TOP
)/tag.sh
73 # parse the version number from the configure.ac file if it is newer
74 #m4_define([purple_major_version], [2])
75 #m4_define([purple_minor_version], [0])
76 #m4_define([purple_micro_version], [0])
77 #m4_define([purple_version_suffix], [devel])
78 PIDGIN_VERSION
:= $(shell \
79 if
[ ! $(PIDGIN_TREE_TOP
)/VERSION
-nt
$(PIDGIN_TREE_TOP
)/configure.ac
]; then \
80 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}' \
81 $(PIDGIN_TREE_TOP
)/configure.ac
> $(PIDGIN_TREE_TOP
)/VERSION
; \
83 cat
$(PIDGIN_TREE_TOP
)/VERSION \
85 PURPLE_VERSION
:= $(PIDGIN_VERSION
)
87 DISPLAY_VERSION
:= $(PIDGIN_VERSION
)-$(EXTRAVERSION
)
89 DISPLAY_VERSION
:= $(PIDGIN_VERSION
)
94 ifeq ($(CYRUS_SASL
), 1)
95 DEFINES
+= -DHAVE_CYRUS_SASL
98 DEFINES
+= -DHAVE_CONFIG_H
-DWIN32_LEAN_AND_MEAN
-DWINVER
=0x0501 -D_WIN32_WINNT
=0x501
100 CFLAGS
+= -O2
-Wall
$(GCCWARNINGS
) $(CC_HARDENING_OPTIONS
) -pipe
-mms-bitfields
-g
102 # If not specified, dlls are built with the default base address of 0x10000000.
103 # When loaded into a process address space a dll will be rebased if its base
104 # address colides with the base address of an existing dll. To avoid rebasing
105 # we do the following. Rebasing can slow down the load time of dlls and it
106 # also renders debug info useless.
107 DLL_LD_FLAGS
+= -Wl
,--enable-auto-image-base
-Wl
,--enable-auto-import
$(LD_HARDENING_OPTIONS
) -lssp
110 ifeq "$(origin CC)" "default"
113 # comment out the next line to make output more verbose
114 CC
:= $(TAG
) "auto" $(CC
)
116 GMSGFMT ?
= $(GETTEXT_TOP
)/bin
/msgfmt
117 MAKENSIS ?
= makensis.exe
121 INTLTOOL_MERGE ?
= $(INTLTOOL_TOP
)/bin
/intltool-merge
122 MONO_SIGNCODE ?
= signcode
124 GLIB_GENMARSHAL ?
= $(GTK_BIN
)/glib-genmarshal
125 GLIB_MKENUMS ?
= $(GTK_BIN
)/glib-mkenums
127 PIDGIN_COMMON_RULES
:= $(PURPLE_TOP
)/win32
/rules.mak
128 PIDGIN_COMMON_TARGETS
:= $(PURPLE_TOP
)/win32
/targets.mak
129 MINGW_MAKEFILE
:= Makefile.mingw
138 -lgstinterfaces-0.10 \
140 VV_INCLUDE_PATHS
:= \
141 -I
$(GSTREAMER_TOP
)/include/gstreamer-0.10 \
142 -I
$(GSTREAMER_TOP
)/include/farstream-0.1 \
143 -I
$(LIBXML2_TOP
)/include/libxml2
145 -L
$(GSTREAMER_TOP
)/lib
146 DEFINES
+= -DUSE_GSTREAMER
-DUSE_VV
154 INSTALL_SSL_CERTIFICATES ?
= 1