view Makefile.mingw @ 28859:50256289be74

*** Plucked rev 1cd91846f484f7d7090d25b0e65d851a0dadcb90 (e894e488d2219b69664de488ee1af7f275f8817d): Improved handling of the 0x00d charset in AIM, which is sent by mobile devices speaking ISO-8859-1. Try UTF-8 first (the encoding sent by iChat in a Direct IM with non-ASCII characters), then fall back to ISO-8859-1. Fixes #a13544, a bug created with the fix for iChat DIM encoding new in libpurple 2.6.4 applied changes from 6f3a1b3c52803e11d4cda1e0537c1270599e8d8e through ed0a2a35c7e22519df27c50069c22b03e01c027a *** Plucked rev e8ba4281669ae86859fd4e29f5d8ea0286af3903 (f05c54b03e6bbfdbff38c01697fbd353a969e05e): Changelog the AIM/ICQ issue. Refs #10900.
author Daniel Atallah <daniel.atallah@gmail.com>
date Thu, 07 Jan 2010 23:43:26 +0000
parents eb54b1f7034b
children 3f33a8fbf871
line wrap: on
line source

# Makefile.mingw
#
# Author: hermanator12002@yahoo.com
# Date 9/11/02
# Description: Top Makefile for win32 (mingw) port of Pidgin and libpurple
#

PIDGIN_TREE_TOP := .
include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak

# Generate a X.X.X.X version for the installer file versioning header
# The last digit will be 99 for a final release, 0 for dev or unknown, or the beta number
PIDGIN_PRODUCT_VERSION = $(shell \
awk 'BEGIN {FS="."} { \
    if (int($$3) == $$3) { \
        $$4 = "99"; \
    } else { \
        $$5 = $$3; \
        sub(int($$3), "", $$5); \
        if ($$5 == "dev") { \
            $$4 = "0"; \
        } else { \
            if (sub("beta", "", $$5) > 0) { \
                $$4 = $$5; \
            } else { \
                $$4 = "0"; \
            } \
        } \
    } \
    printf("%s.%s.%s.%s", $$1, $$2, int($$3), $$4); \
    exit; \
}' VERSION)

GTK_INSTALL_VERSION = $(shell \
  source ../gtk_installer/version.sh; \
  echo $$gtk_version \
)

STRIPPED_RELEASE_DIR = $(PIDGIN_TREE_TOP)/pidgin-$(PIDGIN_VERSION)-win32bin


# Any *.dll or *.exe files included in win32-install-dir that we don't compile
# should be included in this list so they don't get stripped
EXTERNAL_DLLS = \
	comerr32.dll \
	freebl3.dll \
	gssapi32.dll \
	k5sprt32.dll \
	krb5_32.dll \
	libgtkspell.dll \
	libmeanwhile-1.dll \
	libsasl.dll \
	libxml2.dll \
	nspr4.dll \
	nss3.dll \
	nssckbi.dll \
	plc4.dll \
	plds4.dll \
	saslANONYMOUS.dll \
	saslCRAMMD5.dll \
	saslDIGESTMD5.dll \
	saslGSSAPI.dll \
	saslLOGIN.dll \
	saslPLAIN.dll \
	libsilc-1-1-2.dll \
	libsilcclient-1-1-2.dll \
	smime3.dll \
	softokn3.dll \
	ssl3.dll

#build an expression for `find` to use to ignore the above files
EXTERNAL_DLLS_FIND_EXP = $(patsubst %,-o -name %,$(EXTERNAL_DLLS))

.PHONY: all docs install installer installer_nogtk installer_debug installers clean uninstall create_release_install_dir

all: $(PIDGIN_CONFIG_H) $(PIDGIN_REVISION_H)
	$(MAKE) -C $(PURPLE_TOP) -f $(MINGW_MAKEFILE)
	$(MAKE) -C $(PIDGIN_TOP) -f $(MINGW_MAKEFILE)
ifndef DISABLE_NLS
	$(MAKE) -C $(PURPLE_PO_TOP) -f $(MINGW_MAKEFILE)
endif

install: all $(PIDGIN_INSTALL_DIR)
	$(MAKE) -C $(PURPLE_TOP) -f $(MINGW_MAKEFILE) install
	$(MAKE) -C $(PIDGIN_TOP) -f $(MINGW_MAKEFILE) install
ifndef DISABLE_NLS
	$(MAKE) -C $(PURPLE_PO_TOP) -f $(MINGW_MAKEFILE) install
endif
	$(MAKE) -C share/ca-certs -f $(MINGW_MAKEFILE) install
	$(MAKE) -C share/sounds -f $(MINGW_MAKEFILE) install

create_release_install_dir: install
	rm -rf $(STRIPPED_RELEASE_DIR)
	cp -R $(PIDGIN_INSTALL_DIR) $(STRIPPED_RELEASE_DIR)
	find $(STRIPPED_RELEASE_DIR) \( -name '*.dll' -o -name '*.exe' \) \
	 -not \( -false $(EXTERNAL_DLLS_FIND_EXP) \) -exec $(STRIP) --strip-unneeded {} ';'

installer: create_release_install_dir
	$(MAKENSIS) $(MAKENSISOPT)V3 $(MAKENSISOPT)DPIDGIN_VERSION="$(PIDGIN_VERSION)" $(MAKENSISOPT)DPIDGIN_PRODUCT_VERSION="$(PIDGIN_PRODUCT_VERSION)" $(MAKENSISOPT)DWITH_GTK $(MAKENSISOPT)DPIDGIN_INSTALL_DIR="$(STRIPPED_RELEASE_DIR)" $(MAKENSISOPT)DGTK_INSTALL_VERSION="$(GTK_INSTALL_VERSION)" pidgin/win32/nsis/pidgin-installer.nsi
	mv pidgin/win32/nsis/pidgin-$(PIDGIN_VERSION).exe ./

installer_nogtk: create_release_install_dir
	$(MAKENSIS) $(MAKENSISOPT)V3 $(MAKENSISOPT)DPIDGIN_VERSION="$(PIDGIN_VERSION)" $(MAKENSISOPT)DPIDGIN_PRODUCT_VERSION="$(PIDGIN_PRODUCT_VERSION)" $(MAKENSISOPT)DPIDGIN_INSTALL_DIR="$(STRIPPED_RELEASE_DIR)" $(MAKENSISOPT)DGTK_INSTALL_VERSION="$(GTK_INSTALL_VERSION)" pidgin/win32/nsis/pidgin-installer.nsi
	mv pidgin/win32/nsis/pidgin-$(PIDGIN_VERSION)-no-gtk.exe ./

installer_debug: install
	$(MAKENSIS) $(MAKENSISOPT)V3 $(MAKENSISOPT)DPIDGIN_VERSION="$(PIDGIN_VERSION)" $(MAKENSISOPT)DPIDGIN_PRODUCT_VERSION="$(PIDGIN_PRODUCT_VERSION)" $(MAKENSISOPT)DPIDGIN_INSTALL_DIR="$(PIDGIN_INSTALL_DIR)" $(MAKENSISOPT)DDEBUG $(MAKENSISOPT)DGTK_INSTALL_VERSION="$(GTK_INSTALL_VERSION)" pidgin/win32/nsis/pidgin-installer.nsi
	mv pidgin/win32/nsis/pidgin-$(PIDGIN_VERSION)-debug.exe ./

installer_zip: create_release_install_dir
	rm -f pidgin-$(PIDGIN_VERSION)-win32-bin.zip
	zip -9 -r pidgin-$(PIDGIN_VERSION)-win32-bin.zip $(STRIPPED_RELEASE_DIR)

installers: installer installer_nogtk installer_debug installer_zip

Doxyfile.mingw: Doxyfile.in
	sed -e "s/@PACKAGE@/pidgin/" -e "s/@VERSION@/$(PIDGIN_VERSION)/" -e "s/@top_srcdir@/$(PIDGIN_TREE_TOP)/g" -e "s/@enable_dot@/NO/" Doxyfile.in > Doxyfile.mingw

docs: Doxyfile.mingw
	@echo "Running doxygen..."
	@doxygen Doxyfile.mingw

clean:
	$(MAKE) -C $(PURPLE_PO_TOP) -f $(MINGW_MAKEFILE) clean
	$(MAKE) -C $(PIDGIN_TOP) -f $(MINGW_MAKEFILE) clean
	$(MAKE) -C $(PURPLE_TOP) -f $(MINGW_MAKEFILE) clean
	$(MAKE) -C share/ca-certs -f $(MINGW_MAKEFILE) clean
	rm -f $(PIDGIN_CONFIG_H) $(PIDGIN_REVISION_H) $(PIDGIN_REVISION_RAW_TXT) ./VERSION pidgin-$(PIDGIN_VERSION)*.exe pidgin-$(PIDGIN_VERSION)-win32-bin.zip
	rm -rf doc/html Doxyfile.mingw

uninstall:
	rm -rf $(PURPLE_INSTALL_PERL_DIR) $(PIDGIN_INSTALL_PLUGINS_DIR) $(PURPLE_INSTALL_PO_DIR) $(PIDGIN_INSTALL_DIR) $(STRIPPED_RELEASE_DIR)
	rm -f ./VERSION

include $(PIDGIN_COMMON_TARGETS)

.PHONY: $(PIDGIN_REVISION_H) $(PIDGIN_REVISION_RAW_TXT)