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
21 LDFLAGS := $(WINAPP) $(LD_HARDENING_OPTIONS) -Wl,--enable-auto-import -lssp
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 \
39 -I$(GTK_TOP)/include/gtk-2.0 \
40 -I$(GTK_TOP)/include/pango-1.0 \
41 -I$(GTK_TOP)/include/atk-1.0 \
42 -I$(GTK_TOP)/include/cairo \
43 -I$(GTK_TOP)/include/gdk-pixbuf-2.0 \
44 -I$(GTK_TOP)/lib/gtk-2.0/include \
45 -I$(LIBSOUP_TOP)/include/libsoup-2.4 \
46 -I$(LIBGADU_TOP)/include \
47 -I$(WEBKITGTK_TOP)/include/webkitgtk-1.0
49 LIB_PATHS += -L$(GTK_TOP)/lib \
50 -L$(WEBKITGTK_TOP)/lib \
51 -L$(LIBGADU_TOP)/lib \
61 gtkblist-theme-loader.c \
64 gtkcellrendererexpander.c \
69 gtkconv-theme-loader.c \
74 gtkicon-theme-loader.c \
93 gtkstatus-icon-theme.c \
105 win32/gtkwin32dep.c \
108 PIDGIN_RC_SRC = win32/pidgin_dll_rc.rc
109 PIDGIN_OBJECTS = $(PIDGIN_C_SRC:%.c=%.o) $(PIDGIN_RC_SRC:%.rc=%.o)
111 EXE_RC_SRC = win32/pidgin_exe_rc.rc
112 EXE_C_SRC = win32/winpidgin.c
113 EXE_OBJECTS = $(EXE_C_SRC:%.c=%.o) $(EXE_RC_SRC:%.rc=%.o)
138 include $(PIDGIN_COMMON_RULES)
141 ## TARGET DEFINITIONS
143 .PHONY: all install install_shallow clean
145 all: $(EXE_TARGET).exe $(PIDGIN_TARGET).dll
146 $(MAKE_at) $(MAKE) -C $(PIDGIN_PLUGINS_TOP) -f $(MINGW_MAKEFILE)
148 gtkdialogs.c: $(PIDGIN_REVISION_H)
150 win32/pidgin_exe_rc.rc: win32/pidgin_exe_rc.rc.in $(PIDGIN_TREE_TOP)/VERSION
152 @sed -e 's/@PURPLE_VERSION@/$(PIDGIN_VERSION)/g' \
153 -e 's/@PURPLE_MAJOR_VERSION@/$(PURPLE_MAJOR_VERSION)/g' \
154 -e 's/@PURPLE_MINOR_VERSION@/$(PURPLE_MINOR_VERSION)/g' \
155 -e 's/@PURPLE_MICRO_VERSION@/$(PURPLE_MICRO_VERSION)/g' \
156 -e 's/@PURPLE_API_VERSION@/$(PURPLE_API_VERSION)/g' \
159 install_shallow: $(PIDGIN_INSTALL_DIR) $(EXE_TARGET).exe $(PIDGIN_TARGET).dll
160 cp $(EXE_TARGET).exe $(PIDGIN_TARGET).dll $(PIDGIN_INSTALL_DIR)
161 mkdir -p "$(PIDGIN_INSTALL_DIR)/theme"
162 cp -r themes/* "$(PIDGIN_INSTALL_DIR)/theme/"
163 chmod -R 777 "$(PIDGIN_INSTALL_DIR)/theme/"
165 install: install_shallow all
166 $(MAKE_at) $(MAKE) -C $(PIDGIN_PLUGINS_TOP) -f $(MINGW_MAKEFILE) install
167 $(MAKE_at) $(MAKE) -C $(PIDGIN_PIXMAPS_TOP) -f $(MINGW_MAKEFILE) install
169 win32/pidgin_dll_rc.rc: win32/pidgin_dll_rc.rc.in $(PIDGIN_TREE_TOP)/VERSION
171 @sed -e 's/@PURPLE_VERSION@/$(PIDGIN_VERSION)/g' \
172 -e 's/@PURPLE_MAJOR_VERSION@/$(PURPLE_MAJOR_VERSION)/g' \
173 -e 's/@PURPLE_MINOR_VERSION@/$(PURPLE_MINOR_VERSION)/g' \
174 -e 's/@PURPLE_MICRO_VERSION@/$(PURPLE_MICRO_VERSION)/g' \
175 -e 's/@PURPLE_API_VERSION@/$(PURPLE_API_VERSION)/g' \
178 $(EXE_OBJECTS) $(PIDGIN_OBJECTS): $(PIDGIN_CONFIG_H)
180 gtkdebug.c: gtkdebug.html.h
182 $(PIDGIN_TARGET).dll $(PIDGIN_TARGET).dll.a: $(PURPLE_DLL).a $(PIDGIN_OBJECTS)
183 $(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
185 $(EXE_TARGET).exe: $(PIDGIN_CONFIG_H) $(PIDGIN_DLL).a $(EXE_OBJECTS) $(PIDGIN_TARGET).dll
186 $(CC) $(EXE_OBJECTS) $(LDFLAGS) -o $(EXE_TARGET).exe
192 $(MAKE_at) $(MAKE) -C $(PIDGIN_PLUGINS_TOP) -f $(MINGW_MAKEFILE) clean
193 $(MAKE_at) $(MAKE) -C $(PIDGIN_PIXMAPS_TOP) -f $(MINGW_MAKEFILE) clean
194 rm -f $(PIDGIN_OBJECTS) $(PIDGIN_RC_SRC) $(EXE_OBJECTS) $(EXE_RC_SRC)
195 rm -f $(PIDGIN_TARGET).dll $(PIDGIN_TARGET).dll.a $(PIDGIN_TARGET).def
196 rm -f $(EXE_TARGET).exe
198 include $(PIDGIN_COMMON_TARGETS)