I guess I'll release this later today. Is that ok with everyone?
[pidgin-git.git] / pidgin / Makefile.mingw
blob145bb7f6d114af319e7597313b7baab8bffed4ab
2 # Makefile.mingw
4 # Description: Makefile for win32 (mingw) version of Pidgin
7 PIDGIN_TREE_TOP := ..
8 include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
10 DEFINES := $(subst -DWIN32_LEAN_AND_MEAN,,$(DEFINES))
13 ## VARIABLE DEFINITIONS
15 EXE_TARGET := pidgin
16 PIDGIN_TARGET := pidgin
17 EXE_NAME := $(EXE_TARGET).exe
19 WINAPP := -mwindows
21 LDFLAGS := $(WINAPP)
24 ## INCLUDE PATHS
26 PURPLE_INCLUDE_PATHS =  \
27                         -I$(PURPLE_TOP) \
28                         -I$(PURPLE_TOP)/win32 \
29                         -I$(PIDGIN_TREE_TOP) \
30                         -I$(GTK_TOP)/include \
31                         -I$(GTK_TOP)/include/glib-2.0 \
32                         -I$(GTK_TOP)/lib/glib-2.0/include
34 INCLUDE_PATHS +=        \
35                         $(PURPLE_INCLUDE_PATHS) \
36                         -I$(PIDGIN_TOP) \
37                         -I$(PIDGIN_TOP)/win32 \
38                         -I$(GTK_TOP)/include/gtk-2.0 \
39                         -I$(GTK_TOP)/include/pango-1.0 \
40                         -I$(GTK_TOP)/include/atk-1.0 \
41                         -I$(GTK_TOP)/include/cairo \
42                         -I$(GTK_TOP)/lib/gtk-2.0/include \
43                         -I$(GTKSPELL_TOP)/include/gtkspell-2.0
45 LIB_PATHS +=            -L$(GTK_TOP)/lib \
46                         -L$(PURPLE_TOP) \
47                         -L$(PIDGIN_TOP)
50 ##  SOURCES, OBJECTS
52 PIDGIN_C_SRC =  \
53                         gtkaccount.c \
54                         gtkblist-theme-loader.c \
55                         gtkblist-theme.c \
56                         gtkblist.c \
57                         gtkcellrendererexpander.c \
58                         gtkcertmgr.c \
59                         gtkconn.c \
60                         gtkconv.c \
61                         gtkdebug.c \
62                         gtkdialogs.c \
63                         gtkdnd-hints.c \
64                         gtkdocklet.c \
65                         gtkeventloop.c \
66                         gtkft.c \
67                         gtkicon-theme-loader.c \
68                         gtkicon-theme.c \
69                         gtkidle.c \
70                         gtkimhtml.c \
71                         gtkimhtmltoolbar.c \
72                         gtklog.c \
73                         gtkmain.c \
74                         gtkmedia.c \
75                         gtkmenutray.c \
76                         gtknotify.c \
77                         gtkplugin.c \
78                         gtkpluginpref.c \
79                         gtkpounce.c \
80                         gtkprefs.c \
81                         gtkprivacy.c \
82                         gtkrequest.c \
83                         gtkroomlist.c \
84                         gtksavedstatuses.c \
85                         gtkscrollbook.c \
86                         gtksmiley.c \
87                         gtksound.c \
88                         gtksourceiter.c \
89                         gtksourceundomanager.c \
90                         gtkstatus-icon-theme.c \
91                         gtkstatusbox.c \
92                         gtkthemes.c \
93                         gtkutils.c \
94                         gtkwhiteboard.c \
95                         minidialog.c \
96                         pidginstock.c \
97                         pidgintooltip.c \
98                         win32/MinimizeToTray.c \
99                         win32/gtkdocklet-win32.c \
100                         win32/gtkwin32dep.c \
101                         win32/untar.c \
102                         win32/wspell.c
104 PIDGIN_RC_SRC = win32/pidgin_dll_rc.rc
105 PIDGIN_OBJECTS = $(PIDGIN_C_SRC:%.c=%.o) $(PIDGIN_RC_SRC:%.rc=%.o)
107 EXE_RC_SRC = win32/pidgin_exe_rc.rc
108 EXE_C_SRC = win32/winpidgin.c
109 EXE_OBJECTS = $(EXE_C_SRC:%.c=%.o) $(EXE_RC_SRC:%.rc=%.o)
112 ## LIBRARIES
115 PIDGIN_LIBS =   \
116                 -lintl \
117                 -lglib-2.0 \
118                 -lgobject-2.0 \
119                 -lgthread-2.0 \
120                 -lpurple \
121                 -lz \
122                 -lgtk-win32-2.0 \
123                 -latk-1.0 \
124                 -lcairo \
125                 -lpango-1.0 \
126                 -lgdk-win32-2.0 \
127                 -lgdk_pixbuf-2.0 \
128                 -lgdi32 \
129                 -lwinmm
131 include $(PIDGIN_COMMON_RULES)
134 ## TARGET DEFINITIONS
136 .PHONY: all install install_shallow clean
138 all: $(EXE_TARGET).exe $(PIDGIN_TARGET).dll
139         $(MAKE) -C $(PIDGIN_PLUGINS_TOP) -f $(MINGW_MAKEFILE)
141 win32/pidgin_exe_rc.rc: win32/pidgin_exe_rc.rc.in $(PIDGIN_TREE_TOP)/VERSION
142         sed -e 's/@PIDGIN_VERSION@/$(PIDGIN_VERSION)/g' \
143             -e 's/@ORIGINAL_FILENAME@/$(EXE_NAME)/' \
144             $@.in > $@
146 install_shallow: $(PIDGIN_INSTALL_DIR) $(EXE_TARGET).exe $(PIDGIN_TARGET).dll
147         cp $(EXE_TARGET).exe $(PIDGIN_TARGET).dll $(PIDGIN_INSTALL_DIR)
149 install: install_shallow all
150         $(MAKE) -C $(PIDGIN_PLUGINS_TOP) -f $(MINGW_MAKEFILE) install
151         $(MAKE) -C $(PIDGIN_PIXMAPS_TOP) -f $(MINGW_MAKEFILE) install
153 win32/pidgin_dll_rc.rc: win32/pidgin_dll_rc.rc.in $(PIDGIN_TREE_TOP)/VERSION
154         sed -e 's/@PIDGIN_VERSION@/$(PIDGIN_VERSION)/g' \
155             $@.in > $@
157 $(EXE_OBJECTS) $(PIDGIN_OBJECTS): $(PIDGIN_CONFIG_H)
159 $(PIDGIN_TARGET).dll $(PIDGIN_TARGET).dll.a: $(PURPLE_DLL).a $(PIDGIN_OBJECTS)
160         $(CC) -shared $(PIDGIN_OBJECTS) $(LIB_PATHS) $(PIDGIN_LIBS) $(DLL_LD_FLAGS) -Wl,--output-def,$(PIDGIN_TARGET).def,--out-implib,$(PIDGIN_TARGET).dll.a -o $(PIDGIN_TARGET).dll
162 $(EXE_TARGET).exe: $(PIDGIN_CONFIG_H) $(PIDGIN_DLL).a $(EXE_OBJECTS) $(PIDGIN_TARGET).dll
163         $(CC) $(LDFLAGS) $(EXE_OBJECTS) -o $(EXE_TARGET).exe
166 ## CLEAN RULES
168 clean:
169         $(MAKE) -C $(PIDGIN_PLUGINS_TOP) -f $(MINGW_MAKEFILE) clean
170         $(MAKE) -C $(PIDGIN_PIXMAPS_TOP) -f $(MINGW_MAKEFILE) clean
171         rm -f $(PIDGIN_OBJECTS) $(PIDGIN_RC_SRC) $(EXE_OBJECTS) $(EXE_RC_SRC)
172         rm -f $(PIDGIN_TARGET).dll $(PIDGIN_TARGET).dll.a $(PIDGIN_TARGET).def
173         rm -f $(EXE_TARGET).exe
175 include $(PIDGIN_COMMON_TARGETS)