[gaim-migrate @ 4814]
[pidgin-git.git] / Makefile.mingw
blob95eaa85a99ba0cdce9298f325d50a49ffdb082e5
1 # Makefile.mingw
2
3 # Author: hermanator12002@yahoo.com
4 # Date 9/11/02
5 # Description: Top Makefile for win32 (mingw) port of Gaim
8 GAIM_SRC = ./src
9 GAIM_PROTOS = $(GAIM_SRC)/protocols
10 GAIM_PLUGINS = ./plugins
11 GAIM_PIXMAPS = ./pixmaps
12 GAIM_SOUNDS = ./sounds
13 GAIM_INSTALL_DIR = ./win32-install-dir
14 GTK_TOP = ../win32-dev/gtk_2_0
15 GTK_LIBS = $(GTK_TOP)/lib
16 GTK_BIN = $(GTK_TOP)/bin
17 PERL_TOP = ../win32-dev/perl56
18 IDLETRACKER_TOP = $(GAIM_SRC)/win32/IdleTracker
19 GTKRC_TOP = ../win32-dev/gtkrc
20 OSCAR = $(GAIM_PROTOS)/oscar
21 YAHOO = $(GAIM_PROTOS)/yahoo
22 MSN = $(GAIM_PROTOS)/msn
23 TOC = $(GAIM_PROTOS)/toc
24 IRC = $(GAIM_PROTOS)/irc
25 JABBER = $(GAIM_PROTOS)/jabber
26 NAPSTER = $(GAIM_PROTOS)/napster
27 GG = $(GAIM_PROTOS)/gg
28 PO = ./po
30 VERSION := $(shell cat ./VERSION)
32 NEEDED_DLLS =           $(GTK_BIN)/libgdk-win32-2.0-0.dll \
33                         $(GTK_BIN)/libglib-2.0-0.dll \
34                         $(GTK_BIN)/libintl-1.dll \
35                         $(GTK_BIN)/iconv.dll \
36                         $(GTK_BIN)/libgmodule-2.0-0.dll \
37                         $(GTK_BIN)/libgtk-win32-2.0-0.dll \
38                         $(GTK_BIN)/libgdk_pixbuf-2.0-0.dll \
39                         $(GTK_BIN)/libgobject-2.0-0.dll \
40                         $(GTK_BIN)/libgthread-2.0-0.dll \
41                         $(GTK_BIN)/libjpeg.dll \
42                         $(GTK_BIN)/libpng.dll \
43                         $(GTK_BIN)/libtiff.dll \
44                         $(GTK_BIN)/zlib.dll \
45                         $(GTK_BIN)/libpango-1.0-0.dll \
46                         $(GTK_BIN)/libpangoft2-1.0-0.dll \
47                         $(GTK_BIN)/libpangowin32-1.0-0.dll \
48                         $(GTK_BIN)/libatk-1.0-0.dll \
49                         $(PERL_TOP)/perl56.dll \
50                         $(IDLETRACKER_TOP)/IdleTrac.dll
52 # For Gtk 2.0.3
53 #                       $(GTK_BIN)/libjpeg6b.dll \
54 #                       $(GTK_BIN)/libpng-3.dll \
55 #                       $(GTK_BIN)/libtiff.dll \
56 #                       $(GTK_BIN)/libz.dll \
58 # For Gtk 2.0.6
59 #                       $(GTK_BIN)/libjpeg.dll \
60 #                       $(GTK_BIN)/libpng.dll \
61 #                       $(GTK_BIN)/libtiff.dll \
62 #                       $(GTK_BIN)/zlib.dll \
65 SOUNDS =                $(GAIM_SOUNDS)/leave.wav \
66                         $(GAIM_SOUNDS)/redalert.wav \
67                         $(GAIM_SOUNDS)/receive.wav \
68                         $(GAIM_SOUNDS)/send.wav \
69                         $(GAIM_SOUNDS)/arrive.wav
73 ## Don't forget to change STATIC_PROTO_INIT, in config.h.mingw if you 
74 ## change the status of a protocol (static/plugin)
77 OSCAR_TYPE = PLUGIN
78 YAHOO_TYPE = PLUGIN
79 MSN_TYPE = PLUGIN
80 TOC_TYPE = PLUGIN
81 IRC_TYPE = PLUGIN
82 JABBER_TYPE = PLUGIN
83 NAPSTER_TYPE = PLUGIN
84 GG_TYPE = PLUGIN
86 all:
87         cp config.h.mingw config.h
88         $(MAKE) TYPE='$(OSCAR_TYPE)' -C $(OSCAR) -f Makefile.mingw
89         $(MAKE) TYPE='$(YAHOO_TYPE)' -C $(YAHOO) -f Makefile.mingw
90         $(MAKE) TYPE='$(MSN_TYPE)' -C $(MSN) -f Makefile.mingw
91         $(MAKE) TYPE='$(TOC_TYPE)' -C $(TOC) -f Makefile.mingw
92         $(MAKE) TYPE='$(IRC_TYPE)' -C $(IRC) -f Makefile.mingw
93         $(MAKE) TYPE='$(JABBER_TYPE)' -C $(JABBER) -f Makefile.mingw
94         $(MAKE) TYPE='$(GG_TYPE)' -C $(GG) -f Makefile.mingw
95         $(MAKE) -C $(GAIM_SRC) -f Makefile.mingw
96         $(MAKE) -C $(GAIM_PLUGINS) -f Makefile.mingw
99 install: all
100         mkdir -p $(GAIM_INSTALL_DIR)/plugins
101         mkdir -p $(GAIM_INSTALL_DIR)/sounds/gaim
102         $(MAKE) -C $(GAIM_PIXMAPS) -f Makefile.mingw install
103         $(MAKE) -C $(PO) -f Makefile.mingw install
104         $(MAKE) -C $(GAIM_SRC) -f Makefile.mingw install
105         $(MAKE) -C $(GAIM_PLUGINS) -f Makefile.mingw install
106         $(MAKE) TYPE='$(OSCAR_TYPE)' -C $(OSCAR) -f Makefile.mingw install
107         $(MAKE) TYPE='$(YAHOO_TYPE)' -C $(YAHOO) -f Makefile.mingw install
108         $(MAKE) TYPE='$(MSN_TYPE)' -C $(MSN) -f Makefile.mingw install
109         $(MAKE) TYPE='$(TOC_TYPE)' -C $(TOC) -f Makefile.mingw install
110         $(MAKE) TYPE='$(IRC_TYPE)' -C $(IRC) -f Makefile.mingw install
111         $(MAKE) TYPE='$(JABBER_TYPE)' -C $(JABBER) -f Makefile.mingw install
112         $(MAKE) TYPE='$(GG_TYPE)' -C $(GG) -f Makefile.mingw install
113         cp $(NEEDED_DLLS) $(GAIM_INSTALL_DIR)
114         cp $(SOUNDS) $(GAIM_INSTALL_DIR)/sounds/gaim
115         mkdir -p $(GAIM_INSTALL_DIR)/lib/gtk-2.0
116         cp -R $(GTK_LIBS)/gtk-2.0/2.2.0 $(GAIM_INSTALL_DIR)/lib/gtk-2.0
117         cp -R $(GTK_LIBS)/pango $(GAIM_INSTALL_DIR)/lib
118         cp -R $(GTK_TOP)/etc $(GAIM_INSTALL_DIR)
119         cp $(GAIM_SRC)/win32/themes/gtkrc $(GAIM_INSTALL_DIR)/etc/gtk-2.0
121 installer:
122         makensis.exe /DGAIM_VERSION="$(VERSION)" gaim-installer.nsi
124 clean:
125         $(MAKE) -C $(PO) -f Makefile.mingw clean
126         $(MAKE) -C $(OSCAR) -f Makefile.mingw clean
127         $(MAKE) -C $(YAHOO) -f Makefile.mingw clean
128         $(MAKE) -C $(MSN) -f Makefile.mingw clean
129         $(MAKE) -C $(TOC) -f Makefile.mingw clean
130         $(MAKE) -C $(IRC) -f Makefile.mingw clean
131         $(MAKE) -C $(JABBER) -f Makefile.mingw clean
132         $(MAKE) -C $(GG) -f Makefile.mingw clean
133         $(MAKE) -C $(GAIM_SRC) -f Makefile.mingw clean
134         $(MAKE) -C $(GAIM_PLUGINS) -f Makefile.mingw clean
135         rm -rf config.h $(GAIM_INSTALL_DIR)
136         rm -rf gaim*.exe