Fix #3543294: Support Lync 2010 meet URLs (2)
[siplcs.git] / Makefile.mingw
blob5ea2438287dca3b5bbbd0474aa910a1a9e51280c
1 ################################### tell Emacs this is a -*- makefile-gmake -*-
3 # Copyright (C) 2012 SIPE Project <http://sipe.sourceforge.net/>
5 # Makefile.mingw
7 # Author: pier11@operamail.com
8 # Author: zup@sbox.tugraz.at
9 # Date 11 Nov 2009
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
17 endif
18 include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
20 export CFLAGS=-Werror
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
28 all:
29         $(MAKE) -C src -f $(MINGW_MAKEFILE)
30         $(MAKE) -C po -f $(MINGW_MAKEFILE)
32 dev:
33         $(MAKE) -C src -f $(MINGW_MAKEFILE)
35 clean:
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
42 rmbak:
43         rm -f *~
44         $(MAKE) -C src -f $(MINGW_MAKEFILE) rmbak
46 install: all
47         $(MAKE) -C src -f $(MINGW_MAKEFILE) install
48         $(MAKE) -C po -f $(MINGW_MAKEFILE) install
49         $(MAKE) -C pixmaps -f $(MINGW_MAKEFILE) install
51 devinst: dev
52         $(MAKE) -C src -f $(MINGW_MAKEFILE) install
54 tests: dev
55         $(MAKE) -C src -f $(MINGW_MAKEFILE) tests
57 msi: all
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
62 nsis: install
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
67 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); \
74         makensis \
75                 -DVERSION=$(VERSION) \
76                 -DMINGW_LIBDIR=. \
77                 -DMINGW_DATADIR=. \
78                 pidgin-sipe.nsi
79         mv $(PIDGIN_INSTALL_DIR)/pidgin-sipe-$(VERSION).exe $(PIDGIN_TREE_TOP)
80         rm -rf $(PIDGIN_INSTALL_DIR)