changeset 27470:77976350b32d

Fix win32 build for yahoo/yahoojp split.
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 06 Jul 2009 21:07:10 +0000
parents ca66c299dbbf
children d7251e93df17
files libpurple/protocols/yahoo/Makefile.mingw pidgin/win32/nsis/pidgin-installer.nsi
diffstat 2 files changed, 29 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/Makefile.mingw	Mon Jul 06 16:23:10 2009 +0000
+++ b/libpurple/protocols/yahoo/Makefile.mingw	Mon Jul 06 21:07:10 2009 +0000
@@ -7,7 +7,9 @@
 PIDGIN_TREE_TOP := ../../..
 include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
 
-TARGET = libyahoo
+TARGET = libymsg
+YAHOO_TARGET = libyahoo
+YAHOOJP_TARGET = libyahoojp
 TYPE = PLUGIN
 
 # Static or Plugin...
@@ -31,14 +33,15 @@
 			-I$(PURPLE_TOP)/win32 \
 			-I$(PIDGIN_TREE_TOP)
 
-LIB_PATHS +=		-L$(GTK_TOP)/lib \
+LIB_PATHS +=		-L. \
+			-L$(GTK_TOP)/lib \
 			-L$(PURPLE_TOP)
 
 ##
 ##  SOURCES, OBJECTS
 ##
 C_SRC =			util.c \
-			yahoo.c \
+			libymsg.c \
 			yahoochat.c \
 			yahoo_aliases.c \
 			yahoo_doodle.c \
@@ -51,6 +54,12 @@
 
 OBJECTS = $(C_SRC:%.c=%.o)
 
+YAHOO_C_SRC = libyahoo.c
+YAHOO_OBJECTS = $(YAHOO_C_SRC:%.c=%.o)
+
+YAHOOJP_C_SRC = libyahoojp.c
+YAHOOJP_OBJECTS = $(YAHOOJP_C_SRC:%.c=%.o)
+
 ##
 ## LIBRARIES
 ##
@@ -68,21 +77,29 @@
 
 .PHONY: all install clean
 
-all: $(TARGET).dll
+all: $(TARGET).dll $(YAHOO_TARGET).dll $(YAHOOJP_TARGET).dll
 
 install: all $(DLL_INSTALL_DIR)
-	cp $(TARGET).dll $(DLL_INSTALL_DIR)
+	cp $(YAHOO_TARGET).dll $(YAHOOJP_TARGET).dll $(DLL_INSTALL_DIR)
+	cp $(TARGET).dll $(PURPLE_INSTALL_DIR)
 
 $(OBJECTS): $(PURPLE_CONFIG_H)
 
-$(TARGET).dll: $(PURPLE_DLL).a $(OBJECTS)
-	$(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET).dll
+$(TARGET).dll.a $(TARGET).dll: $(PURPLE_DLL).a $(OBJECTS)
+	$(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -Wl,--output-def,$(TARGET).def,--out-implib,$(TARGET).dll.a -o $(TARGET).dll
+
+$(YAHOO_TARGET).dll: $(TARGET).dll.a $(YAHOO_OBJECTS)
+	$(CC) -shared $(YAHOO_OBJECTS) $(LIB_PATHS) $(LIBS) -lymsg $(DLL_LD_FLAGS) -o $(YAHOO_TARGET).dll
+
+$(YAHOOJP_TARGET).dll: $(TARGET).dll.a $(YAHOOJP_OBJECTS)
+	$(CC) -shared $(YAHOOJP_OBJECTS) $(LIB_PATHS) $(LIBS) -lymsg $(DLL_LD_FLAGS) -o $(YAHOOJP_TARGET).dll
 
 ##
 ## CLEAN RULES
 ##
 clean:
-	rm -f $(OBJECTS)
-	rm -f $(TARGET).dll
+	rm -f $(OBJECTS) $(TARGET).dll $(TARGET).dll.a
+	rm -f $(YAHOO_OBJECTS) $(YAHOO_TARGET).dll
+	rm -f $(YAHOOJP_OBJECTS) $(YAHOOJP_TARGET).dll
 
 include $(PIDGIN_COMMON_TARGETS)
--- a/pidgin/win32/nsis/pidgin-installer.nsi	Mon Jul 06 16:23:10 2009 +0000
+++ b/pidgin/win32/nsis/pidgin-installer.nsi	Mon Jul 06 21:07:10 2009 +0000
@@ -2,7 +2,7 @@
 ; Original Author: Herman Bloggs <hermanator12002@yahoo.com>
 ; Updated By: Daniel Atallah <daniel_atallah@yahoo.com>
 
-; NOTE: this .NSI script is intended for NSIS 2.27
+; NOTE: this .NSI script is intended for NSIS 2.27+
 ;
 
 ;--------------------------------
@@ -751,6 +751,7 @@
     Delete "$INSTDIR\plugins\libsimple.dll"
     Delete "$INSTDIR\plugins\libtoc.dll"
     Delete "$INSTDIR\plugins\libyahoo.dll"
+    Delete "$INSTDIR\plugins\libyahoojp.dll"
     Delete "$INSTDIR\plugins\libxmpp.dll"
     Delete "$INSTDIR\plugins\log_reader.dll"
     Delete "$INSTDIR\plugins\markerline.dll"
@@ -794,6 +795,7 @@
     Delete "$INSTDIR\libsilc-1-1-2.dll"
     Delete "$INSTDIR\libsilcclient-1-1-2.dll"
     Delete "$INSTDIR\libxml2.dll"
+    Delete "$INSTDIR\libymsg.dll"
     Delete "$INSTDIR\nspr4.dll"
     Delete "$INSTDIR\nss3.dll"
     Delete "$INSTDIR\nssckbi.dll"