# This file should be included by all Makefile.mingw files for project # wide definitions (after correctly defining PIDGIN_TREE_TOP). #include optional $(PIDGIN_TREE_TOP)/local.mak to allow overriding of any definitions -include $(PIDGIN_TREE_TOP)/local.mak # TODO: we should do parsing like for PURPLE_VERSION, if we won't drop # Makefile.mingw files before 3.0.0 release PURPLE_MAJOR_VERSION := 3 PURPLE_MINOR_VERSION := 0 PURPLE_MICRO_VERSION := 0 # Locations of our various dependencies WIN32_DEV_TOP ?= $(PIDGIN_TREE_TOP
)/../win32-dev
ENCHANT_TOP ?= $(WIN32_DEV_TOP
)/enchant-1.6
GNUTLS_TOP ?= $(WIN32_DEV_TOP
)/gnutls-3.1
GTK_TOP ?= $(WIN32_DEV_TOP
)/gtk2-2.24
GTK_BIN ?= $(GTK_TOP
)/bin
JSON_GLIB_TOP ?= $(WIN32_DEV_TOP
)/json-glib-0.14
LIBXML2_TOP ?= $(WIN32_DEV_TOP
)/libxml2-2.9
MEANWHILE_TOP ?= $(WIN32_DEV_TOP
)/meanwhile-1.0
NSS_TOP ?= $(WIN32_DEV_TOP
)/nss-3.17.3-nspr-4.10.7
PERL_LIB_TOP ?= $(WIN32_DEV_TOP
)/perl-5.10
SILC_TOOLKIT ?= $(WIN32_DEV_TOP
)/silc-toolkit-1.1
GSTREAMER_TOP ?= $(WIN32_DEV_TOP
)/gstreamer-0.10
GCC_SSP_TOP ?= $(shell
dirname
$(shell
which
$(CC
))) CYRUS_SASL_TOP ?= $(WIN32_DEV_TOP
)/cyrus-sasl-2.1
WEBKITGTK_TOP ?= $(WIN32_DEV_TOP
)/libwebkitgtk-1.10
LIBSOUP_TOP ?= $(WIN32_DEV_TOP
)/libsoup-2.42
GETTEXT_TOP ?= $(WIN32_DEV_TOP
)/gettext-0.18
INTLTOOL_TOP ?= $(WIN32_DEV_TOP
)/intltool-0.50
LIBGADU_TOP ?= $(WIN32_DEV_TOP
)/libgadu-1.12
# Where we installing this stuff to? PIDGIN_INSTALL_DIR := $(PIDGIN_TREE_TOP
)/win32-install-dir
PURPLE_INSTALL_DIR := $(PIDGIN_TREE_TOP
)/win32-install-dir
PIDGIN_INSTALL_PLUGINS_DIR := $(PIDGIN_INSTALL_DIR
)/plugins
PIDGIN_INSTALL_PERL_DIR := $(PIDGIN_INSTALL_PLUGINS_DIR
)/perl
PURPLE_INSTALL_PLUGINS_DIR := $(PURPLE_INSTALL_DIR
)/plugins
PURPLE_INSTALL_PERL_DIR := $(PURPLE_INSTALL_PLUGINS_DIR
)/perl
PURPLE_INSTALL_PO_DIR := $(PURPLE_INSTALL_DIR
)/locale
# Important (enough) locations in our source code PURPLE_TOP := $(PIDGIN_TREE_TOP
)/libpurple
PURPLE_PLUGINS_TOP := $(PURPLE_TOP
)/plugins
PURPLE_PERL_TOP := $(PURPLE_PLUGINS_TOP
)/perl
PIDGIN_TOP := $(PIDGIN_TREE_TOP
)/pidgin
PIDGIN_PIXMAPS_TOP := $(PIDGIN_TOP
)/pixmaps
PIDGIN_PLUGINS_TOP := $(PIDGIN_TOP
)/plugins
PURPLE_PO_TOP := $(PIDGIN_TREE_TOP
)/po
PURPLE_PROTOS_TOP := $(PURPLE_TOP
)/protocols
# Locations of important (in-tree) build targets PIDGIN_CONFIG_H := $(PIDGIN_TREE_TOP
)/config.h
PURPLE_CONFIG_H := $(PIDGIN_TREE_TOP
)/config.h
PIDGIN_REVISION_H := $(PIDGIN_TREE_TOP
)/package_revision.h
PIDGIN_REVISION_RAW_TXT := $(PIDGIN_TREE_TOP
)/package_revision_raw.txt
PURPLE_PURPLE_H := $(PURPLE_TOP
)/purple.h
PURPLE_VERSION_H := $(PURPLE_TOP
)/version.h
PURPLE_DLL := $(PURPLE_TOP
)/libpurple.dll
PURPLE_PERL_DLL := $(PURPLE_PERL_TOP
)/perl.dll
PIDGIN_DLL := $(PIDGIN_TOP
)/pidgin.dll
PIDGIN_EXE := $(PIDGIN_TOP
)/pidgin.exe
PIDGIN_PORTABLE_EXE := $(PIDGIN_TOP
)/pidgin-portable.exe
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
CC_HARDENING_OPTIONS ?= -Wstack-protector
-fwrapv
-fno-strict-overflow
-Wno-missing-field-initializers
-Wformat-security
-fstack-protector-all
--param
ssp-buffer-size
=1 LD_HARDENING_OPTIONS ?= -Wl,--dynamicbase
-Wl,--nxcompat
TAG := @
$(PURPLE_TOP
)/tag.sh
# parse the version number from the configure.ac file if it is newer #m4_define([purple_major_version], [2]) #m4_define([purple_minor_version], [0]) #m4_define([purple_micro_version], [0]) #m4_define([purple_version_suffix], [devel]) PIDGIN_VERSION := $(shell
\ if [ ! $(PIDGIN_TREE_TOP)/VERSION -nt $(PIDGIN_TREE_TOP)/configure.ac ]; then \ 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}' \ $(PIDGIN_TREE_TOP)/configure.ac > $(PIDGIN_TREE_TOP)/VERSION; \ cat $(PIDGIN_TREE_TOP)/VERSION \ PURPLE_VERSION := $(PIDGIN_VERSION
) DISPLAY_VERSION := $(PIDGIN_VERSION
)-
$(EXTRAVERSION
) DISPLAY_VERSION := $(PIDGIN_VERSION
) DEFINES += -DHAVE_CYRUS_SASL
DEFINES += -DHAVE_CONFIG_H
-DWIN32_LEAN_AND_MEAN
CFLAGS += -O2
-Wall
$(GCCWARNINGS
) $(CC_HARDENING_OPTIONS
) -pipe
-mms-bitfields
-g
# If not specified, dlls are built with the default base address of 0x10000000. # When loaded into a process address space a dll will be rebased if its base # address colides with the base address of an existing dll. To avoid rebasing # we do the following. Rebasing can slow down the load time of dlls and it # also renders debug info useless. DLL_LD_FLAGS += -Wl,--enable-auto-image-base
-Wl,--enable-auto-import
$(LD_HARDENING_OPTIONS
) -lssp
ifeq "$(origin CC)" "default" # comment out the next line to make output more verbose CC := $(TAG
) "auto" $(CC
) GMSGFMT ?= $(GETTEXT_TOP
)/bin/msgfmt
INTLTOOL_MERGE ?= $(INTLTOOL_TOP
)/bin/intltool-merge
MONO_SIGNCODE ?= signcode
GLIB_GENMARSHAL ?= $(GTK_BIN
)/glib-genmarshal
GLIB_MKENUMS ?= $(GTK_BIN
)/glib-mkenums
PIDGIN_COMMON_RULES := $(PURPLE_TOP
)/win32/rules.mak
PIDGIN_COMMON_TARGETS := $(PURPLE_TOP
)/win32/targets.mak
MINGW_MAKEFILE := Makefile.mingw
-I
$(GSTREAMER_TOP
)/include/gstreamer-0.10
\ -I
$(GSTREAMER_TOP
)/include/farstream-0.1
\ -I
$(LIBXML2_TOP
)/include/libxml2
DEFINES += -DUSE_GSTREAMER
-DUSE_VV
INSTALL_SSL_CERTIFICATES ?= 1