4 # Description: Makefile for win32 (mingw) version of Pidgin
8 include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
10 DEFINES := $(subst -DWIN32_LEAN_AND_MEAN,,$(DEFINES))
12 NEEDED_DLLS = $(GTKSPELL_TOP)/gtkspell/libgtkspell.dll
15 ## VARIABLE DEFINITIONS
18 PIDGIN_TARGET := pidgin
19 EXE_NAME := $(EXE_TARGET).exe
28 PURPLE_INCLUDE_PATHS = \
30 -I$(PURPLE_TOP)/win32 \
31 -I$(PIDGIN_TREE_TOP) \
32 -I$(GTK_TOP)/include \
33 -I$(GTK_TOP)/include/glib-2.0 \
34 -I$(GTK_TOP)/lib/glib-2.0/include
37 $(PURPLE_INCLUDE_PATHS) \
38 -I$(PIDGIN_IDLETRACK_TOP) \
40 -I$(PIDGIN_TOP)/win32 \
41 -I$(GTK_TOP)/include/gtk-2.0 \
42 -I$(GTK_TOP)/include/pango-1.0 \
43 -I$(GTK_TOP)/include/atk-1.0 \
44 -I$(GTK_TOP)/include/cairo \
45 -I$(GTK_TOP)/lib/gtk-2.0/include \
47 -I$(ASPELL_TOP)/include
49 LIB_PATHS += -L$(GTK_TOP)/lib \
52 -L$(PIDGIN_IDLETRACK_TOP) \
60 gtkblist-theme-loader.c \
63 gtkcellrendererexpander.c \
64 gtkcellrendererprogress.c \
75 gtkicon-theme-loader.c \
97 gtksourceundomanager.c \
98 gtkstatus-icon-theme.c \
106 win32/MinimizeToTray.c \
107 win32/gtkdocklet-win32.c \
108 win32/gtkwin32dep.c \
112 PIDGIN_RC_SRC = win32/pidgin_dll_rc.rc
113 PIDGIN_OBJECTS = $(PIDGIN_C_SRC:%.c=%.o) $(PIDGIN_RC_SRC:%.rc=%.o)
115 EXE_RC_SRC = win32/pidgin_exe_rc.rc
116 EXE_C_SRC = win32/winpidgin.c
117 EXE_OBJECTS = $(EXE_C_SRC:%.c=%.o) $(EXE_RC_SRC:%.rc=%.o)
139 include $(PIDGIN_COMMON_RULES)
142 ## TARGET DEFINITIONS
144 .PHONY: all install install_shallow clean
146 all: $(EXE_TARGET).exe $(PIDGIN_TARGET).dll
147 $(MAKE) -C $(PIDGIN_PLUGINS_TOP) -f $(MINGW_MAKEFILE)
149 win32/pidgin_exe_rc.rc: win32/pidgin_exe_rc.rc.in $(PIDGIN_TREE_TOP)/VERSION
150 sed -e 's/@PIDGIN_VERSION@/$(PIDGIN_VERSION)/g' \
151 -e 's/@ORIGINAL_FILENAME@/$(EXE_NAME)/' \
154 install_shallow: $(PIDGIN_INSTALL_DIR) $(EXE_TARGET).exe $(PIDGIN_TARGET).dll
155 cp $(EXE_TARGET).exe $(PIDGIN_TARGET).dll $(PIDGIN_INSTALL_DIR)
156 cp $(NEEDED_DLLS) $(PIDGIN_INSTALL_DIR)
158 install: install_shallow all
159 $(MAKE) -C $(PIDGIN_PLUGINS_TOP) -f $(MINGW_MAKEFILE) install
160 $(MAKE) -C $(PIDGIN_PIXMAPS_TOP) -f $(MINGW_MAKEFILE) install
161 $(MAKE) -C $(PIDGIN_IDLETRACK_TOP) -f $(MINGW_MAKEFILE) install
163 win32/pidgin_dll_rc.rc: win32/pidgin_dll_rc.rc.in $(PIDGIN_TREE_TOP)/VERSION
164 sed -e 's/@PIDGIN_VERSION@/$(PIDGIN_VERSION)/g' \
167 $(EXE_OBJECTS) $(PIDGIN_OBJECTS): $(PIDGIN_CONFIG_H)
169 $(PIDGIN_TARGET).dll $(PIDGIN_TARGET).dll.a: $(PURPLE_DLL).a $(PIDGIN_IDLETRACK_DLL).a $(PIDGIN_OBJECTS)
170 $(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
172 $(EXE_TARGET).exe: $(PIDGIN_CONFIG_H) $(PIDGIN_DLL).a $(PIDGIN_IDLETRACK_DLL).a $(EXE_OBJECTS)
173 $(CC) $(LDFLAGS) $(EXE_OBJECTS) -o $(EXE_TARGET).exe
179 $(MAKE) -C $(PIDGIN_IDLETRACK_TOP) -f $(MINGW_MAKEFILE) clean
180 $(MAKE) -C $(PIDGIN_PLUGINS_TOP) -f $(MINGW_MAKEFILE) clean
181 $(MAKE) -C $(PIDGIN_PIXMAPS_TOP) -f $(MINGW_MAKEFILE) clean
182 rm -f $(PIDGIN_OBJECTS) $(PIDGIN_RC_SRC) $(EXE_OBJECTS) $(EXE_RC_SRC)
183 rm -f $(PIDGIN_TARGET).dll $(PIDGIN_TARGET).dll.a $(PIDGIN_TARGET).def
184 rm -f $(EXE_TARGET).exe
186 include $(PIDGIN_COMMON_TARGETS)