And fix the typo I wouldn't have caught if I didn't see the commit mail.
[pidgin-git.git] / Makefile.mingw
blobfba747addffc4542fff1313746956869afdb1079
1 # Makefile.mingw
3 # Author: hermanator12002@yahoo.com
4 # Date 9/11/02
5 # Description: Top Makefile for win32 (mingw) port of Pidgin and libpurple
8 PIDGIN_TREE_TOP := .
9 include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
11 # Generate a X.X.X.X version for the installer file versioning header
12 # The last digit will be 99 for a final release, 0 for dev or unknown, or the beta number
13 PIDGIN_PRODUCT_VERSION = $(shell \
14 awk 'BEGIN {FS="."} { \
15     if (int($$3) == $$3) { \
16         $$4 = "99"; \
17     } else { \
18         $$5 = $$3; \
19         sub(int($$3), "", $$5); \
20         if ($$5 == "dev") { \
21             $$4 = "0"; \
22         } else { \
23             if (sub("beta", "", $$5) > 0) { \
24                 $$4 = $$5; \
25             } else { \
26                 $$4 = "0"; \
27             } \
28         } \
29     } \
30     printf("%s.%s.%s.%s", $$1, $$2, int($$3), $$4); \
31     exit; \
32 }' VERSION)
34 GTK_INSTALL_VERSION = $(shell \
35   source ../gtk_installer/version.sh; \
36   echo $$gtk_version \
39 STRIPPED_RELEASE_DIR = $(PIDGIN_TREE_TOP)/pidgin-$(PIDGIN_VERSION)-win32bin
42 # Any *.dll or *.exe files included in win32-install-dir that we don't compile
43 # should be included in this list so they don't get stripped
44 EXTERNAL_DLLS = \
45         comerr32.dll \
46         freebl3.dll \
47         gssapi32.dll \
48         k5sprt32.dll \
49         krb5_32.dll \
50         libgtkspell.dll \
51         libmeanwhile-1.dll \
52         libsasl.dll \
53         libxml2.dll \
54         nspr4.dll \
55         nss3.dll \
56         nssckbi.dll \
57         plc4.dll \
58         plds4.dll \
59         saslANONYMOUS.dll \
60         saslCRAMMD5.dll \
61         saslDIGESTMD5.dll \
62         saslGSSAPI.dll \
63         saslLOGIN.dll \
64         saslPLAIN.dll \
65         libsilc-1-1-2.dll \
66         libsilcclient-1-1-2.dll \
67         smime3.dll \
68         softokn3.dll \
69         ssl3.dll
71 #build an expression for `find` to use to ignore the above files
72 EXTERNAL_DLLS_FIND_EXP = $(patsubst %,-o -name %,$(EXTERNAL_DLLS))
74 .PHONY: all docs install installer installer_nogtk installer_debug installers clean uninstall create_release_install_dir
76 all: $(PIDGIN_CONFIG_H) $(PIDGIN_REVISION_H)
77         $(MAKE) -C $(PURPLE_TOP) -f $(MINGW_MAKEFILE)
78         $(MAKE) -C $(PIDGIN_TOP) -f $(MINGW_MAKEFILE)
79 ifndef DISABLE_NLS
80         $(MAKE) -C $(PURPLE_PO_TOP) -f $(MINGW_MAKEFILE)
81 endif
83 install: all $(PIDGIN_INSTALL_DIR)
84         $(MAKE) -C $(PURPLE_TOP) -f $(MINGW_MAKEFILE) install
85         $(MAKE) -C $(PIDGIN_TOP) -f $(MINGW_MAKEFILE) install
86 ifndef DISABLE_NLS
87         $(MAKE) -C $(PURPLE_PO_TOP) -f $(MINGW_MAKEFILE) install
88 endif
89         $(MAKE) -C share/ca-certs -f $(MINGW_MAKEFILE) install
90         $(MAKE) -C share/sounds -f $(MINGW_MAKEFILE) install
92 create_release_install_dir: install
93         rm -rf $(STRIPPED_RELEASE_DIR)
94         cp -R $(PIDGIN_INSTALL_DIR) $(STRIPPED_RELEASE_DIR)
95         find $(STRIPPED_RELEASE_DIR) \( -name '*.dll' -o -name '*.exe' \) \
96          -not \( -false $(EXTERNAL_DLLS_FIND_EXP) \) -exec $(STRIP) --strip-unneeded {} ';'
98 installer: create_release_install_dir
99         $(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
100         mv pidgin/win32/nsis/pidgin-$(PIDGIN_VERSION).exe ./
102 installer_nogtk: create_release_install_dir
103         $(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
104         mv pidgin/win32/nsis/pidgin-$(PIDGIN_VERSION)-no-gtk.exe ./
106 installer_debug: install
107         $(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
108         mv pidgin/win32/nsis/pidgin-$(PIDGIN_VERSION)-debug.exe ./
110 installer_zip: create_release_install_dir
111         rm -f pidgin-$(PIDGIN_VERSION)-win32-bin.zip
112         zip -9 -r pidgin-$(PIDGIN_VERSION)-win32-bin.zip $(STRIPPED_RELEASE_DIR)
114 installers: installer installer_nogtk installer_debug installer_zip
116 Doxyfile.mingw: Doxyfile.in
117         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
119 docs: Doxyfile.mingw
120         @echo "Running doxygen..."
121         @doxygen Doxyfile.mingw
123 clean:
124         $(MAKE) -C $(PURPLE_PO_TOP) -f $(MINGW_MAKEFILE) clean
125         $(MAKE) -C $(PIDGIN_TOP) -f $(MINGW_MAKEFILE) clean
126         $(MAKE) -C $(PURPLE_TOP) -f $(MINGW_MAKEFILE) clean
127         $(MAKE) -C share/ca-certs -f $(MINGW_MAKEFILE) clean
128         rm -f $(PIDGIN_CONFIG_H) $(PIDGIN_REVISION_H) $(PIDGIN_REVISION_RAW_TXT) ./VERSION pidgin-$(PIDGIN_VERSION)*.exe pidgin-$(PIDGIN_VERSION)-win32-bin.zip
129         rm -rf doc/html Doxyfile.mingw
131 uninstall:
132         rm -rf $(PURPLE_INSTALL_PERL_DIR) $(PIDGIN_INSTALL_PLUGINS_DIR) $(PURPLE_INSTALL_PO_DIR) $(PIDGIN_INSTALL_DIR) $(STRIPPED_RELEASE_DIR)
133         rm -f ./VERSION
135 include $(PIDGIN_COMMON_TARGETS)
137 .PHONY: $(PIDGIN_REVISION_H) $(PIDGIN_REVISION_RAW_TXT)