1 ################################### tell Emacs this is a -*- makefile-gmake -*-
3 # Copyright (C) 2012-2014 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)
25 PIDGIN_VERSION := $(shell cat $(PIDGIN_TREE_TOP)/VERSION)
27 .PHONY: all clean install msi dev devinst nsis
30 $(MAKE) -C src -f $(MINGW_MAKEFILE)
31 $(MAKE) -C po -f $(MINGW_MAKEFILE)
34 $(MAKE) -C src -f $(MINGW_MAKEFILE)
37 $(MAKE) -C src -f $(MINGW_MAKEFILE) clean
38 $(MAKE) -C po -f $(MINGW_MAKEFILE) clean
39 rm -f $(WXS_NAME).wix*
40 rm -f $(WXS_NAME)-$(VERSION).msi
41 rm -f pidgin-sipe-$(VERSION).exe
45 $(MAKE) -C src -f $(MINGW_MAKEFILE) rmbak
48 $(MAKE) -C src -f $(MINGW_MAKEFILE) install
49 $(MAKE) -C po -f $(MINGW_MAKEFILE) install
50 $(MAKE) -C pixmaps -f $(MINGW_MAKEFILE) install
53 $(MAKE) -C src -f $(MINGW_MAKEFILE) install
56 $(MAKE) -C src -f $(MINGW_MAKEFILE) tests
59 PACKAGE_VERSION=$(VERSION) $(WIX3_HOME)/bin/candle $(WXS_NAME).wxs
60 $(WIX3_HOME)/bin/light $(WXS_NAME).wixobj
61 mv $(WXS_NAME).msi $(WXS_NAME)-$(VERSION).msi
64 makensis -DTREETOP=..\\pidgin-2.10.0 -DVERSION=$(VERSION) pidgin-sipe.nsi
66 # MinGW cross-compile build (see contrib/mingw-cross-compile/README.txt)
67 .PHONY: cross-compile-nsis
69 $(MAKE) -f Makefile.mingw install
70 mv $(PIDGIN_INSTALL_DIR)/plugins $(PIDGIN_INSTALL_DIR)/purple-2
71 perl contrib/opensuse-build-service/generate_nsi.pl po/LINGUAS \
72 <contrib/opensuse-build-service/pidgin-sipe.nsi.template \
73 >$(PIDGIN_INSTALL_DIR)/pidgin-sipe.nsi
74 set -e; cd $(PIDGIN_INSTALL_DIR); \
76 -DPIDGIN_VERSION=$(PIDGIN_VERSION) \
77 -DVERSION=$(VERSION) \
81 mv $(PIDGIN_INSTALL_DIR)/pidgin-sipe-$(VERSION).exe $(PIDGIN_TREE_TOP)
82 rm -rf $(PIDGIN_INSTALL_DIR)