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))
13 ## VARIABLE DEFINITIONS
16 PIDGIN_TARGET := pidgin
17 EXE_NAME := $(EXE_TARGET).exe
26 PURPLE_INCLUDE_PATHS = \
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
35 $(PURPLE_INCLUDE_PATHS) \
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 \
54 gtkblist-theme-loader.c \
57 gtkcellrendererexpander.c \
67 gtkicon-theme-loader.c \
89 gtksourceundomanager.c \
90 gtkstatus-icon-theme.c \
98 win32/MinimizeToTray.c \
99 win32/gtkdocklet-win32.c \
100 win32/gtkwin32dep.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)
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)/' \
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' \
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
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)