libpurple/win32/global.mak

Fri, 09 Nov 2007 08:48:40 +0000

author
John Bailey <rekkanoryo@rekkanoryo.org>
date
Fri, 09 Nov 2007 08:48:40 +0000
branch
release-2.2.3
changeset 20289
5c844288fbec
parent 20288
5ca925a094e2
child 21466
491faf2e1fe4
permissions
-rw-r--r--

applied changes from 32f31e981f0618a4167aa98bcc22c2dab13d1550
through a9f75de97d6cdf8fe8bf091b95def6c648aac82f

applied changes from a9f75de97d6cdf8fe8bf091b95def6c648aac82f
through 7c9f2e0cc4967a3eaade95d32f164349b6d1aa03

applied changes from a9f75de97d6cdf8fe8bf091b95def6c648aac82f
through fc4350a15fdd1f51b4496568afaa83355e18b714

applied changes from fc4350a15fdd1f51b4496568afaa83355e18b714
through 18ccd2ba2c1c9b7fa3dfedf72b48b3bd01c3a7c4

applied changes from a9f75de97d6cdf8fe8bf091b95def6c648aac82f
through 20236f54c97e87512b7eb716559a4bd86b73f833

applied changes from 868a040ee69c6e45b9132e7254a3f523e55385b2
through 0e154355bb3e8bdaeb793b142075b60671b37a48

applied changes from 329395b9793793f35bcf231033c1eb942513ab01
through 9d8120be512c235d76a8f6fee60cae024da8772e

#
# global.mak
#
# 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

# Locations of our various dependencies
WIN32_DEV_TOP ?= $(PIDGIN_TREE_TOP)/../win32-dev
ASPELL_TOP ?= $(WIN32_DEV_TOP)/aspell-dev-0-50-3-3
GTKSPELL_TOP ?= $(WIN32_DEV_TOP)/gtkspell-2.0.11-daa1
GTK_TOP ?= $(WIN32_DEV_TOP)/gtk_2_0
GTK_BIN ?= $(GTK_TOP)/bin
BONJOUR_TOP ?= $(WIN32_DEV_TOP)/Bonjour_SDK
LIBXML2_TOP ?= $(WIN32_DEV_TOP)/libxml2-2.6.30
MEANWHILE_TOP ?= $(WIN32_DEV_TOP)/meanwhile-1.0.2
NSPR_TOP ?= $(WIN32_DEV_TOP)/nspr-4.6.4
NSS_TOP ?= $(WIN32_DEV_TOP)/nss-3.11.4
PERL_LIB_TOP ?= $(WIN32_DEV_TOP)/perl58
SILC_TOOLKIT ?= $(WIN32_DEV_TOP)/silc-toolkit-1.1.2
TCL_LIB_TOP ?= $(WIN32_DEV_TOP)/tcl-8.4.5
GSTREAMER_TOP ?= $(WIN32_DEV_TOP)/gstreamer-0.10.13

# 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_PERLMOD_DIR := $(PIDGIN_INSTALL_DIR)/perlmod
PIDGIN_INSTALL_PLUGINS_DIR := $(PIDGIN_INSTALL_DIR)/plugins
PURPLE_INSTALL_PERLMOD_DIR := $(PURPLE_INSTALL_DIR)/perlmod
PURPLE_INSTALL_PLUGINS_DIR := $(PURPLE_INSTALL_DIR)/plugins
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_IDLETRACK_TOP := $(PIDGIN_TOP)/win32/IdleTracker
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_IDLETRACK_DLL := $(PIDGIN_IDLETRACK_TOP)/idletrack.dll
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

# 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; \
  fi; \
  cat $(PIDGIN_TREE_TOP)/VERSION \
)
PURPLE_VERSION := $(PIDGIN_VERSION)

DEFINES += -DHAVE_CONFIG_H

# Use -g flag when building debug version of Pidgin (including plugins).
# Use -fnative-struct instead of -mms-bitfields when using mingw 1.1
# (gcc 2.95)
CFLAGS += -O2 -Wall $(GCCWARNINGS) -pipe -mno-cygwin -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

# Build programs
ifeq "$(origin CC)" "default"
  CC := gcc.exe
endif
GMSGFMT ?= $(GTK_BIN)/msgfmt
MAKENSIS ?= makensis.exe
PERL ?= /cygdrive/c/perl/bin/perl
WINDRES ?= windres
STRIP ?= strip

PIDGIN_COMMON_RULES := $(PURPLE_TOP)/win32/rules.mak
PIDGIN_COMMON_TARGETS := $(PURPLE_TOP)/win32/targets.mak
MINGW_MAKEFILE := Makefile.mingw

mercurial