1 ################################### tell Emacs this is a -*- makefile-gmake -*-
3 # Copyright (C) 2012 SIPE Project <http://sipe.sourceforge.net/>
7 # Author: pier11@operamail.com
8 # Author: zup@sbox.tugraz.at
10 # Description: Top Makefile for win32 (mingw) port of LCS protocol plugin
12 ###############################################################################
14 ifndef PIDGIN_TREE_TOP
15 # standalone MinGW build
16 export PIDGIN_TREE_TOP := ../pidgin-2.10.0
18 include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
22 WIX3_HOME := /cygdrive/c/Program\ Files/Windows\ Installer\ XML\ v3
23 WXS_NAME := pidgin-sipe
24 export VERSION := $(shell cat VERSION)
26 .PHONY: all clean install msi dev devinst nsis
29 $(MAKE) -C src -f $(MINGW_MAKEFILE)
30 $(MAKE) -C po -f $(MINGW_MAKEFILE)
33 $(MAKE) -C src -f $(MINGW_MAKEFILE)
36 $(MAKE) -C src -f $(MINGW_MAKEFILE) clean
37 $(MAKE) -C po -f $(MINGW_MAKEFILE) clean
38 rm -f $(WXS_NAME).wix*
39 rm -f $(WXS_NAME)-$(VERSION).msi
40 rm -f pidgin-sipe-$(VERSION).exe
44 $(MAKE) -C src -f $(MINGW_MAKEFILE) rmbak
47 $(MAKE) -C src -f $(MINGW_MAKEFILE) install
48 $(MAKE) -C po -f $(MINGW_MAKEFILE) install
49 $(MAKE) -C pixmaps -f $(MINGW_MAKEFILE) install
52 $(MAKE) -C src -f $(MINGW_MAKEFILE) install
55 $(MAKE) -C src -f $(MINGW_MAKEFILE) tests
58 PACKAGE_VERSION=$(VERSION) $(WIX3_HOME)/bin/candle $(WXS_NAME).wxs
59 $(WIX3_HOME)/bin/light $(WXS_NAME).wixobj
60 mv $(WXS_NAME).msi $(WXS_NAME)-$(VERSION).msi
63 makensis -DTREETOP=..\\pidgin-2.10.0 -DVERSION=$(VERSION) pidgin-sipe.nsi
65 # MinGW cross-compile build (see contrib/mingw-cross-compile/README.txt)
66 .PHONY: cross-compile-nsis
68 $(MAKE) -f Makefile.mingw install
69 mv $(PIDGIN_INSTALL_DIR)/plugins $(PIDGIN_INSTALL_DIR)/purple-2
70 perl contrib/opensuse-build-service/generate_nsi.pl po/LINGUAS \
71 <contrib/opensuse-build-service/pidgin-sipe.nsi.template \
72 >$(PIDGIN_INSTALL_DIR)/pidgin-sipe.nsi
73 set -e; cd $(PIDGIN_INSTALL_DIR); \
75 -DVERSION=$(VERSION) \
79 mv $(PIDGIN_INSTALL_DIR)/pidgin-sipe-$(VERSION).exe $(PIDGIN_TREE_TOP)
80 rm -rf $(PIDGIN_INSTALL_DIR)