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)
130 include $(PIDGIN_COMMON_RULES)
133 ## TARGET DEFINITIONS
135 .PHONY: all install install_shallow clean
137 all: $(EXE_TARGET).exe $(PIDGIN_TARGET).dll
138 $(MAKE) -C $(PIDGIN_PLUGINS_TOP) -f $(MINGW_MAKEFILE)
140 win32/pidgin_exe_rc.rc: win32/pidgin_exe_rc.rc.in $(PIDGIN_TREE_TOP)/VERSION
141 sed -e 's/@PIDGIN_VERSION@/$(PIDGIN_VERSION)/g' \
142 -e 's/@ORIGINAL_FILENAME@/$(EXE_NAME)/' \
145 install_shallow: $(PIDGIN_INSTALL_DIR) $(EXE_TARGET).exe $(PIDGIN_TARGET).dll
146 cp $(EXE_TARGET).exe $(PIDGIN_TARGET).dll $(PIDGIN_INSTALL_DIR)
148 install: install_shallow all
149 $(MAKE) -C $(PIDGIN_PLUGINS_TOP) -f $(MINGW_MAKEFILE) install
150 $(MAKE) -C $(PIDGIN_PIXMAPS_TOP) -f $(MINGW_MAKEFILE) install
152 win32/pidgin_dll_rc.rc: win32/pidgin_dll_rc.rc.in $(PIDGIN_TREE_TOP)/VERSION
153 sed -e 's/@PIDGIN_VERSION@/$(PIDGIN_VERSION)/g' \
156 $(EXE_OBJECTS) $(PIDGIN_OBJECTS): $(PIDGIN_CONFIG_H)
158 $(PIDGIN_TARGET).dll $(PIDGIN_TARGET).dll.a: $(PURPLE_DLL).a $(PIDGIN_OBJECTS)
159 $(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
161 $(EXE_TARGET).exe: $(PIDGIN_CONFIG_H) $(PIDGIN_DLL).a $(EXE_OBJECTS) $(PIDGIN_TARGET).dll
162 $(CC) $(LDFLAGS) $(EXE_OBJECTS) -o $(EXE_TARGET).exe
168 $(MAKE) -C $(PIDGIN_PLUGINS_TOP) -f $(MINGW_MAKEFILE) clean
169 $(MAKE) -C $(PIDGIN_PIXMAPS_TOP) -f $(MINGW_MAKEFILE) clean
170 rm -f $(PIDGIN_OBJECTS) $(PIDGIN_RC_SRC) $(EXE_OBJECTS) $(EXE_RC_SRC)
171 rm -f $(PIDGIN_TARGET).dll $(PIDGIN_TARGET).dll.a $(PIDGIN_TARGET).def
172 rm -f $(EXE_TARGET).exe
174 include $(PIDGIN_COMMON_TARGETS)