view pidgin/Makefile.mingw @ 16307:9326d4cf5497

If anyone sees the "Unable to add buddy 1" message after this commit, please let me know. More changes in an effort to get rid of the "Unable to Add, Could not add the buddy 1 for an unknown reason. The most common reason for this is that you have the maximum number of allowed buddies in your buddy list" message. My previous checkin fixed a problem that resulted in the same error, but the cause was completely different. The important change in this commit is the one in aim_ssi_itemlist_add(). Apparently there's this funky thing where items in the master group can't have a buddy ID equal to any group ID. Who knew? There are a few other minor changes in this commit. I added a "break" when looping through the items making sure we don't pick a buddy ID that's already in use. And added some checks to make sure we never try to update our data if we haven't received the list from the server yet. Oh, and the 2 bytes that specify the length of the checksum for the icon are two separate values. The first byte is either a 0 or a 1 and I don't know what it means. The second byte is the length of the checksum.
author Mark Doliner <mark@kingant.net>
date Mon, 23 Apr 2007 01:05:27 +0000
parents e8173e12182a
children 1843c0180fbe
line wrap: on
line source

#
# Makefile.mingw
#
# Description: Makefile for win32 (mingw) version of Pidgin
#

PIDGIN_TREE_TOP := ..
include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak

NEEDED_DLLS = $(GTKSPELL_TOP)/gtkspell/libgtkspell.dll

##
## VARIABLE DEFINITIONS
##
EXE_TARGET := pidgin
PIDGIN_TARGET := pidgin
EXE_NAME := $(EXE_TARGET).exe

WINAPP := -mwindows

LDFLAGS := $(WINAPP)

##
## INCLUDE PATHS
##
PURPLE_INCLUDE_PATHS =	\
			-I$(PURPLE_TOP) \
			-I$(PURPLE_TOP)/win32 \
			-I$(PIDGIN_TREE_TOP) \
			-I$(GTK_TOP)/include \
			-I$(GTK_TOP)/include/glib-2.0 \
			-I$(GTK_TOP)/lib/glib-2.0/include

INCLUDE_PATHS =	\
			$(PURPLE_INCLUDE_PATHS) \
			-I$(PIDGIN_IDLETRACK_TOP) \
			-I$(PIDGIN_TOP) \
			-I$(PIDGIN_TOP)/win32 \
			-I$(GTK_TOP)/include/gtk-2.0 \
			-I$(GTK_TOP)/include/pango-1.0 \
			-I$(GTK_TOP)/include/atk-1.0 \
			-I$(GTK_TOP)/include/cairo \
			-I$(GTK_TOP)/lib/gtk-2.0/include \
			-I$(GTKSPELL_TOP) \
			-I$(ASPELL_TOP)/include

LIB_PATHS =		-L$(GTK_TOP)/lib \
			-L$(PURPLE_TOP) \
			-L$(PIDGIN_TOP) \
			-L$(PIDGIN_IDLETRACK_TOP) \
			-L$(ASPELL_TOP)/lib

##
##  SOURCES, OBJECTS
##
PIDGIN_C_SRC =	\
			gtkaccount.c \
			gtkblist.c \
			gtkconn.c \
			gtkconv.c \
			gtkcellrendererexpander.c \
			gtkcellrendererprogress.c \
			gtkdebug.c \
			gtkdialogs.c \
			gtkdnd-hints.c \
			gtkdocklet.c \
			gtkeventloop.c \
			gtkexpander.c \
			gtkft.c \
			gtkidle.c \
			gtkimhtml.c \
			gtkimhtmltoolbar.c \
			gtklog.c \
			gtkmain.c \
			gtkmenutray.c \
			gtknotify.c \
			gtkplugin.c \
			gtkpluginpref.c \
			gtkpounce.c \
			gtkprefs.c \
			gtkprivacy.c \
			gtkrequest.c \
			gtkroomlist.c \
			gtksavedstatuses.c \
			gtkscrollbook.c \
			gtksound.c \
			gtksourceiter.c \
			gtkstatusbox.c \
			gtkthemes.c \
			gtkutils.c \
			gtkwhiteboard.c \
			pidginstock.c \
			win32/MinimizeToTray.c \
			win32/gtkdocklet-win32.c \
			win32/gtkwin32dep.c \
			win32/untar.c \
			win32/wspell.c

PIDGIN_RC_SRC = win32/pidgin_dll_rc.rc
PIDGIN_OBJECTS = $(PIDGIN_C_SRC:%.c=%.o) $(PIDGIN_RC_SRC:%.rc=%.o)

EXE_RC_SRC = win32/pidgin_exe_rc.rc
EXE_C_SRC = win32/winpidgin.c
EXE_OBJECTS = $(EXE_C_SRC:%.c=%.o) $(EXE_RC_SRC:%.rc=%.o)

##
## LIBRARIES
##
LIBPURPLES =	\
		-lpurple \
		-lglib-2.0 \
		-lgthread-2.0 \
		-lgobject-2.0 \
		-lgmodule-2.0 \
		-lintl \
		-lws2_32 \
		-lwinmm \
		-lz

GTKPURPLES =	\
		$(LIBPURPLES) \
		-lidletrack \
		-lgtk-win32-2.0 \
		-latk-1.0 \
		-lpango-1.0 \
		-lgdk-win32-2.0 \
		-lgdk_pixbuf-2.0 \
		-lgdi32

include $(PIDGIN_COMMON_RULES)

##
## TARGET DEFINITIONS
##
.PHONY: all install install_shallow clean clean_exe

all: $(EXE_TARGET).exe $(PIDGIN_TARGET).dll
	$(MAKE) -C $(PIDGIN_PLUGINS_TOP) -f $(MINGW_MAKEFILE)

win32/pidgin_exe_rc.rc: win32/pidgin_exe_rc.rc.in $(PIDGIN_TREE_TOP)/VERSION
	sed -e 's/@PIDGIN_VERSION@/$(PIDGIN_VERSION)/g' \
	    -e 's/@ORIGINAL_FILENAME@/$(EXE_NAME)/' \
	    $@.in > $@

install_shallow: $(PIDGIN_INSTALL_DIR) $(EXE_TARGET).exe $(PIDGIN_TARGET).dll
	cp $(EXE_TARGET).exe $(PIDGIN_TARGET).dll $(PIDGIN_INSTALL_DIR)
	cp $(NEEDED_DLLS) $(PIDGIN_INSTALL_DIR)

install: install_shallow all
	$(MAKE) -C $(PIDGIN_PLUGINS_TOP) -f $(MINGW_MAKEFILE) install
	$(MAKE) -C $(PIDGIN_PIXMAPS_TOP) -f $(MINGW_MAKEFILE) install
	$(MAKE) -C $(PIDGIN_SOUNDS_TOP) -f $(MINGW_MAKEFILE) install
	$(MAKE) -C $(PIDGIN_IDLETRACK_TOP) -f $(MINGW_MAKEFILE) install

win32/pidgin_dll_rc.rc: win32/pidgin_dll_rc.rc.in $(PIDGIN_TREE_TOP)/VERSION
	sed -e 's/@PIDGIN_VERSION@/$(PIDGIN_VERSION)/g' \
	    $@.in > $@

$(EXE_OBJECTS) $(PIDGIN_OBJECTS): $(PIDGIN_CONFIG_H)

$(PIDGIN_TARGET).dll $(PIDGIN_TARGET).dll.a: $(PURPLE_DLL).a $(PIDGIN_IDLETRACK_DLL).a $(PIDGIN_OBJECTS)
	$(CC) -shared $(PIDGIN_OBJECTS) $(LIB_PATHS) $(GTKPURPLES) $(DLL_LD_FLAGS) -Wl,--out-implib,$(PIDGIN_TARGET).dll.a -o $(PIDGIN_TARGET).dll

$(EXE_TARGET).exe: $(PIDGIN_CONFIG_H) $(PIDGIN_DLL).a $(PIDGIN_IDLETRACK_DLL).a $(EXE_OBJECTS)
	$(CC) $(LDFLAGS) $(EXE_OBJECTS) -o $(EXE_TARGET).exe

$(EXE_TARGET)-portable.exe: DEFINES += -DPORTABLE
$(EXE_TARGET)-portable.exe: EXE_NAME := $(EXE_TARGET)-portable.exe
$(EXE_TARGET)-portable.exe: clean_exe $(PIDGIN_CONFIG_H) $(PIDGIN_DLL).a $(PIDGIN_IDLETRACK_DLL).a $(EXE_OBJECTS)
	$(CC) $(LDFLAGS) $(EXE_OBJECTS) -o $(EXE_TARGET)-portable.exe
	$(MAKE) -f $(MINGW_MAKEFILE) clean_exe

##
## CLEAN RULES
##
clean:
	$(MAKE) -C $(PIDGIN_IDLETRACK_TOP) -f $(MINGW_MAKEFILE) clean
	$(MAKE) -C $(PIDGIN_PLUGINS_TOP) -f $(MINGW_MAKEFILE) clean
	rm -f $(PIDGIN_OBJECTS) $(PIDGIN_RC_SRC) $(EXE_OBJECTS) $(EXE_RC_SRC)
	rm -f $(PIDGIN_TARGET).dll $(PIDGIN_TARGET).dll.a
	rm -f $(EXE_TARGET).exe $(EXE_TARGET)-portable.exe

clean_exe:
	rm -f $(EXE_OBJECTS) $(EXE_RC_SRC)

include $(PIDGIN_COMMON_TARGETS)