Release 1.25.0 -- Buddy Idle Time, RTF
[siplcs.git] / Makefile.mingw
blob07680c21fee0b1db2211f085a7005ed282aa5765
1 ################################### tell Emacs this is a -*- makefile-gmake -*-
3 # Copyright (C) 2012-2014 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)
25 PIDGIN_VERSION := $(shell cat $(PIDGIN_TREE_TOP)/VERSION)
27 .PHONY: all clean install msi dev devinst nsis
29 all:
30         $(MAKE) -C src -f $(MINGW_MAKEFILE)
31         $(MAKE) -C po -f $(MINGW_MAKEFILE)
33 dev:
34         $(MAKE) -C src -f $(MINGW_MAKEFILE)
36 clean:
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
43 rmbak:
44         rm -f *~
45         $(MAKE) -C src -f $(MINGW_MAKEFILE) rmbak
47 install: all
48         $(MAKE) -C src -f $(MINGW_MAKEFILE) install
49         $(MAKE) -C po -f $(MINGW_MAKEFILE) install
50         $(MAKE) -C pixmaps -f $(MINGW_MAKEFILE) install
52 devinst: dev
53         $(MAKE) -C src -f $(MINGW_MAKEFILE) install
55 tests: dev
56         $(MAKE) -C src -f $(MINGW_MAKEFILE) tests
58 msi: all
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
63 nsis: install
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
68 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); \
75         makensis \
76                 -DPIDGIN_VERSION=$(PIDGIN_VERSION) \
77                 -DVERSION=$(VERSION) \
78                 -DMINGW_LIBDIR=. \
79                 -DMINGW_DATADIR=. \
80                 pidgin-sipe.nsi
81         mv $(PIDGIN_INSTALL_DIR)/pidgin-sipe-$(VERSION).exe $(PIDGIN_TREE_TOP)
82         rm -rf $(PIDGIN_INSTALL_DIR)