changeset 4202:59751fe608c5

[gaim-migrate @ 4438] Much needed Makefile.am cleanups. Sorry for the large mass of commit e-mails, everyone. These changes should work on older versions of automake and newer versions. If you do have a problem, let me know, but it should be a smooth transition. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 05 Jan 2003 03:02:55 +0000
parents 511c2b63caa4
children ec6d0c5e5c23
files plugins/.cvsignore plugins/Makefile.am plugins/autorecon.c plugins/chatlist.c plugins/docklet/Makefile.am plugins/history.c plugins/iconaway.c plugins/idle.c plugins/mailchk.c plugins/notify.c plugins/spellchk.c plugins/ticker/Makefile.am plugins/timestamp.c src/Makefile.am src/protocols/gg/Makefile.am src/protocols/icq/Makefile.am src/protocols/irc/Makefile.am src/protocols/jabber/Makefile.am src/protocols/msn/Makefile.am src/protocols/napster/Makefile.am src/protocols/oscar/Makefile.am src/protocols/toc/Makefile.am src/protocols/yahoo/Makefile.am src/protocols/zephyr/Makefile.am
diffstat 24 files changed, 426 insertions(+), 428 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/.cvsignore	Sat Jan 04 21:01:32 2003 +0000
+++ b/plugins/.cvsignore	Sun Jan 05 03:02:55 2003 +0000
@@ -4,3 +4,5 @@
 autorecon.dll
 iconaway.dll
 spellchk.dll
+*.la
+*.lo
--- a/plugins/Makefile.am	Sat Jan 04 21:01:32 2003 +0000
+++ b/plugins/Makefile.am	Sun Jan 05 03:02:55 2003 +0000
@@ -1,32 +1,62 @@
 SUBDIRS = docklet ticker
 
-CFLAGS += -I\$(top_srcdir) -I\$(top_srcdir)/src -DVERSION=\"$(VERSION)\"
+plugindir = $(libdir)/gaim
+
+#CFLAGS += -I\$(top_srcdir) -I\$(top_srcdir)/src -DVERSION=\"$(VERSION)\" $(DEBUG_CFLAGS)
+
+
+autorecon_la_LDFLAGS = -module -avoid-version
+chatlist_la_LDFLAGS  = -module -avoid-version
+iconaway_la_LDFLAGS  = -module -avoid-version
+notify_la_LDFLAGS    = -module -avoid-version
+spellchk_la_LDFLAGS  = -module -avoid-version
+history_la_LDFLAGS   = -module -avoid-version
+timestamp_la_LDFLAGS = -module -avoid-version
+idle_la_LDFLAGS      = -module -avoid-version
+
+if PLUGINS
+
+plugin_LTLIBRARIES = \
+	autorecon.la   \
+	chatlist.la    \
+	iconaway.la    \
+	notify.la      \
+	spellchk.la    \
+	history.la     \
+	timestamp.la   \
+	idle.la
+
+autorecon_la_SOURCES = autorecon.c
+chatlist_la_SOURCES  = chatlist.c
+iconaway_la_SOURCES  = iconaway.c
+notify_la_SOURCES    = notify.c
+spellchk_la_SOURCES  = spellchk.c
+history_la_SOURCES   = history.c
+timestamp_la_SOURCES = timestamp.c
+idle_la_SOURCES      = idle.c
+
+endif
+
+EXTRA_DIST = \
+	ChangeLog PERL-HOWTO HOWTO SIGNALS \
+	filectl.c mailchk.c gtik.c error.c \
+	gaim.pl fortuneprofile.pl
+
+AM_CPPFLAGS = \
+	-I$(top_srcdir)/src \
+	-DVERSION=\"$(VERSION)\" \
+	$(DEBUG_CFLAGS) \
+	$(PLUGIN_CFLAGS)
+
+#
+# This part allows people to build their own plugins in here.
+# Yes, it's a mess.
+#
 SUFFIXES = .c .so
 .c.so:
-	$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $< -o tmp$@.lo $(PLUGIN_CFLAGS)
+	$(LIBTOOL) --mode=compile $(CC) $(AM_CPPFLAGS) $(CFLAGS) -c $< -o tmp$@.lo $(PLUGIN_CFLAGS)
 	$(LIBTOOL) --mode=link    $(CC) $(CFLAGS) -o libtmp$@.la -rpath $(plugindir) tmp$@.lo $(LIBS) $(LDFLAGS) -module -avoid-version $(PLUGIN_LIBS)
 	@rm -f tmp$@.lo tmp$@.o libtmp$@.la
 	@cp .libs/libtmp$@.so* $@
 	@rm -f .libs/libtmp$@.*
 
-if PLUGINS
-
-plugindir = $(libdir)/gaim
-
-plugin_DATA = autorecon.so chatlist.so iconaway.so notify.so spellchk.so history.so timestamp.so idle.so
-
-$(plugin_DATA): $(top_srcdir)/src/gaim.h
-
-clean distclean:
-	rm -rf $(plugin_DATA) .libs
-
-else
-
-plugin_DATA = 
-
-endif
-
-
-EXTRA_DIST = ChangeLog PERL-HOWTO HOWTO SIGNALS autorecon.c filectl.c iconaway.c \
-		notify.c spellchk.c gaim.pl mailchk.c chatlist.c gtik.c error.c  \
-		history.c timestamp.c fortuneprofile.pl idle.c
--- a/plugins/autorecon.c	Sat Jan 04 21:01:32 2003 +0000
+++ b/plugins/autorecon.c	Sun Jan 05 03:02:55 2003 +0000
@@ -1,4 +1,9 @@
+#include "config.h"
+
+#ifndef GAIM_PLUGINS
 #define GAIM_PLUGINS
+#endif
+
 #include "gaim.h"
 #include "prpl.h"
 
--- a/plugins/chatlist.c	Sat Jan 04 21:01:32 2003 +0000
+++ b/plugins/chatlist.c	Sun Jan 05 03:02:55 2003 +0000
@@ -1,4 +1,8 @@
+#include "config.h"
+
+#ifndef GAIM_PLUGINS
 #define GAIM_PLUGINS
+#endif
 
 #include "pixmaps/refresh.xpm"
 #include "pixmaps/gnome_add.xpm"
--- a/plugins/docklet/Makefile.am	Sat Jan 04 21:01:32 2003 +0000
+++ b/plugins/docklet/Makefile.am	Sun Jan 05 03:02:55 2003 +0000
@@ -14,7 +14,7 @@
 endif
 
 INCLUDES = \
-	-I$(top_srcdir) \
 	-I$(top_srcdir)/src \
 	-DVERSION=\"$(VERSION)\" \
-	-DDATADIR=\"$(datadir)\"
+	-DDATADIR=\"$(datadir)\" \
+	$(DEBUG_CFLAGS)
--- a/plugins/history.c	Sat Jan 04 21:01:32 2003 +0000
+++ b/plugins/history.c	Sun Jan 05 03:02:55 2003 +0000
@@ -1,7 +1,12 @@
 /* Puts last 4k of log in new conversations a la Everybuddy (and then
  * stolen by Trillian "Pro") */
 
+#include "config.h"
+
+#ifndef GAIM_PLUGINS
 #define GAIM_PLUGINS
+#endif
+
 #include "gaim.h"
 #include "gtkimhtml.h"
 #include <sys/stat.h>
--- a/plugins/iconaway.c	Sat Jan 04 21:01:32 2003 +0000
+++ b/plugins/iconaway.c	Sun Jan 05 03:02:55 2003 +0000
@@ -1,4 +1,9 @@
+#include "config.h"
+
+#ifndef GAIM_PLUGINS
 #define GAIM_PLUGINS
+#endif
+
 #include "gaim.h"
 
 #include <gtk/gtk.h>
--- a/plugins/idle.c	Sat Jan 04 21:01:32 2003 +0000
+++ b/plugins/idle.c	Sun Jan 05 03:02:55 2003 +0000
@@ -3,7 +3,12 @@
  * 40-day idle times.
  */
 
+#include "config.h"
+
+#ifndef GAIM_PLUGINS
 #define GAIM_PLUGINS
+#endif
+
 #include "multi.h"
 #include "gaim.h"
 #include <sys/time.h>
--- a/plugins/mailchk.c	Sat Jan 04 21:01:32 2003 +0000
+++ b/plugins/mailchk.c	Sun Jan 05 03:02:55 2003 +0000
@@ -1,4 +1,9 @@
+#include "config.h"
+
+#ifndef GAIM_PLUGINS
 #define GAIM_PLUGINS
+#endif
+
 #include "gaim.h"
 #include <sys/stat.h>
 #include <sys/types.h>
--- a/plugins/notify.c	Sat Jan 04 21:01:32 2003 +0000
+++ b/plugins/notify.c	Sun Jan 05 03:02:55 2003 +0000
@@ -15,6 +15,8 @@
  *   for count of new messages option
  */
 
+#include "config.h"
+
 #ifndef GAIM_PLUGINS
 #define GAIM_PLUGINS
 #endif
--- a/plugins/spellchk.c	Sat Jan 04 21:01:32 2003 +0000
+++ b/plugins/spellchk.c	Sun Jan 05 03:02:55 2003 +0000
@@ -8,7 +8,12 @@
  * BUGS:
  * 	? I think i fixed them all.
  */
+#include "config.h"
+
+#ifndef GAIM_PLUGINS
 #define GAIM_PLUGINS
+#endif
+
 #include "gaim.h"
 
 #include <string.h>
--- a/plugins/ticker/Makefile.am	Sat Jan 04 21:01:32 2003 +0000
+++ b/plugins/ticker/Makefile.am	Sun Jan 05 03:02:55 2003 +0000
@@ -13,6 +13,8 @@
 
 endif
 
+CFLAGS += $(DEBUG_CFLAGS)
+
 INCLUDES = \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/src \
--- a/plugins/timestamp.c	Sat Jan 04 21:01:32 2003 +0000
+++ b/plugins/timestamp.c	Sun Jan 05 03:02:55 2003 +0000
@@ -1,7 +1,12 @@
 /* iChat-like timestamps by Sean Egan.
  * <INSERT GPL HERE> */
 
+#include "config.h"
+
+#ifndef GAIM_PLUGINS
 #define GAIM_PLUGINS
+#endif
+
 #include <time.h>
 #include "gaim.h"
 #include "gtkimhtml.h"
--- a/src/Makefile.am	Sat Jan 04 21:01:32 2003 +0000
+++ b/src/Makefile.am	Sun Jan 05 03:02:55 2003 +0000
@@ -1,3 +1,8 @@
+EXTRA_DIST = \
+		getopt.c \
+		getopt.h \
+		getopt1.c
+
 SUBDIRS = protocols
 
 bin_PROGRAMS = gaim gaim-remote
@@ -8,49 +13,57 @@
 		buddy.c \
 		buddy_chat.c \
 		conversation.c \
+		convo.h \
 		core.c \
 		dialogs.c \
 		ft.c \
+		gaim.h \
+		gaim-socket.h \
 		gaimrc.c \
 		gtkimhtml.c \
+		gtkimhtml.h \
 		html.c \
 		idle.c \
 		list.c \
 		log.c \
 		md5.c \
+		md5.h \
 		module.c \
 		multi.c \
+		multi.h \
 		perl.c \
 		prefs.c \
 		proxy.c \
+		proxy.h \
 		prpl.c \
+		prpl.h \
 		server.c \
 		session.c \
 		socket.c \
 		sound.c \
-		util.c
+		util.c \
+		ui.h
+
 gaim_DEPENDENCIES = @LIBOBJS@ $(STATIC_LINK_LIBS)
 gaim_LDFLAGS = -export-dynamic
-gaim_LDADD = @LDADD@ @LIBOBJS@
-
-gaim_remote_LDADD = @LDADD@ @LIBOBJS@
-gaim_remote_SOURCES = gaim-remote.c socket.c
-
-CFLAGS += $(PERL_CFLAGS) $(GTKSPELL_CFLAGS)
-CFLAGS += -DLOCALEDIR=\"$(datadir)/locale\" -DLIBDIR=\"$(libdir)/gaim/\" $(DEBUG_CFLAGS) -DDATADIR=\"$(datadir)\"
-
-LIBS = @LIBS@ $(GTK_LIBS) $(SOUND_LIBS) $(STATIC_LINK_LIBS) $(PERL_LIBS) $(XSS_LIBS) $(SM_LIBS) $(INTLLIBS) $(DEBUG_LIBS) $(GTKSPELL_LIBS)
+gaim_LDADD = \
+	$(GTK_LIBS) \
+	$(SOUND_LIBS) \
+	$(STATIC_LINK_LIBS) \
+	$(PERL_LIBS) \
+	$(XSS_LIBS) \
+	$(SM_LIBS) \
+	$(INTLLIBS) \
+	$(GTKSPELL_LIBS)
 
-EXTRA_DIST =	convo.h \
-		core.h \
-		gaim.h \
-		gaim-socket.h \
-		getopt.c \
-		getopt.h \
-		getopt1.c \
-		gtkimhtml.h \
-		md5.h \
-		multi.h \
-		prpl.h \
-		proxy.h \
-		ui.h
+gaim_remote_SOURCES = gaim-remote.c socket.c
+gaim_remote_LDADD = $(GLIB_LIBS)
+
+AM_CPPFLAGS = \
+	$(PERL_CFLAGS) \
+	$(GTKSPELL_CFLAGS) \
+	-DLOCALEDIR=\"$(datadir)/locale\" \
+	-DLIBDIR=\"$(libdir)/gaim/\" \
+	-DDATADIR=\"$(datadir)\" \
+	$(DEBUG_CFLAGS)
+
--- a/src/protocols/gg/Makefile.am	Sat Jan 04 21:01:32 2003 +0000
+++ b/src/protocols/gg/Makefile.am	Sun Jan 05 03:02:55 2003 +0000
@@ -2,31 +2,33 @@
 
 pkgdir = $(libdir)/gaim
 
-CFLAGS += -I\$(top_srcdir)/src $(st) $(DEBUG_CFLAGS)
+GGSOURCES = \
+	libgg.c \
+	libgg.h \
+	common.c \
+	gg.c
+
+AM_CFLAGS = $(st)
+
 libgg_la_LDFLAGS = -module -avoid-version
 
 if STATIC_GG
 
 st = -DSTATIC
-pkg_LTLIBRARIES =
 noinst_LIBRARIES = libgg.a
 
-libgg_a_SOURCES = libgg.c \
-		  libgg.h \
-		  common.c \
-		  gg.c
-
-libgg_a_CFLAGS = $(AM_CFLAGS)
+libgg_a_SOURCES = $(GGSOURCES)
+libgg_a_CFLAGS  = $(AM_CFLAGS)
 
 else
 
 st =
 pkg_LTLIBRARIES = libgg.la
-noinst_LIBRARIES =
 
-libgg_la_SOURCES = libgg.c \
-		   libgg.h \
-		   common.c \
-		   gg.c
+libgg_la_SOURCES = $(GGSOURCES)
 
 endif
+
+AM_CPPFLAGS = \
+	-I$(top_srcdir)/src \
+	$(DEBUG_CFLAGS)
--- a/src/protocols/icq/Makefile.am	Sat Jan 04 21:01:32 2003 +0000
+++ b/src/protocols/icq/Makefile.am	Sun Jan 05 03:02:55 2003 +0000
@@ -1,59 +1,67 @@
-EXTRA_DIST =	AUTHORS \
-		COPYING \
-		ChangeLog \
-		INSTALL \
-		README \
-		VERSION
+EXTRA_DIST = \
+	AUTHORS \
+	COPYING \
+	ChangeLog \
+	INSTALL \
+	README \
+	VERSION
 
 pkgdir = $(libdir)/gaim
 
-CFLAGS += -I\$(top_srcdir)/src $(st) $(DEBUG_CFLAGS)
+ICQSOURCES = \
+	chatsession.c \
+	chatsession.h \
+	contacts.c \
+	contacts.h \
+	cyrillic.c \
+	eventhandle.c \
+	eventhandle.h \
+	filesession.c \
+	filesession.h \
+	icq.h \
+	icqbyteorder.c \
+	icqbyteorder.h \
+	icqevent.c \
+	icqevent.h \
+	icqlib.c \
+	icqlib.h \
+	icqpacket.c \
+	icqpacket.h \
+	icqtypes.h \
+	list.c \
+	list.h \
+	proxy.c \
+	queue.c \
+	queue.h \
+	socketmanager.c \
+	socketmanager.h \
+	stdpackets.c \
+	stdpackets.h \
+	tcp.c \
+	tcp.h \
+	tcpchathandle.c \
+	tcpfilehandle.c \
+	tcphandle.c \
+	tcplink.c \
+	tcplink.h \
+	timeout.c \
+	timeout.h \
+	udp.c \
+	udp.h \
+	udphandle.c \
+	util.c \
+	util.h \
+	gaim_icq.c
+
+AM_CFLAGS = $(st)
+
 libicq_la_LDFLAGS =	-module -avoid-version
 
 st =
 pkg_LTLIBRARIES = libicq.la
-noinst_LIBRARIES =
+
+libicq_la_SOURCES =	$(ICQSOURCES)
 
-libicq_la_SOURCES =	chatsession.c \
-			chatsession.h \
-			contacts.c \
-			contacts.h \
-			cyrillic.c \
-			eventhandle.c \
-			eventhandle.h \
-			filesession.c \
-			filesession.h \
-			icq.h \
-			icqbyteorder.c \
-			icqbyteorder.h \
-			icqevent.c \
-			icqevent.h \
-			icqlib.c \
-			icqlib.h \
-			icqpacket.c \
-			icqpacket.h \
-			icqtypes.h \
-			list.c \
-			list.h \
-			proxy.c \
-			queue.c \
-			queue.h \
-			socketmanager.c \
-			socketmanager.h \
-			stdpackets.c \
-			stdpackets.h \
-			tcp.c \
-			tcp.h \
-			tcpchathandle.c \
-			tcpfilehandle.c \
-			tcphandle.c \
-			tcplink.c \
-			tcplink.h \
-			timeout.c \
-			timeout.h \
-			udp.c \
-			udp.h \
-			udphandle.c \
-			util.c \
-			util.h \
-			gaim_icq.c
+AM_CPPFLAGS = \
+	-I$(top_srcdir)/src \
+	$(DEBUG_CFLAGS)
--- a/src/protocols/irc/Makefile.am	Sat Jan 04 21:01:32 2003 +0000
+++ b/src/protocols/irc/Makefile.am	Sun Jan 05 03:02:55 2003 +0000
@@ -2,18 +2,20 @@
 
 pkgdir = $(libdir)/gaim
 
-CFLAGS += -I\$(top_srcdir)/src $(st) $(DEBUG_CFLAGS)
+IRCSOURCES = irc.c
+
+AM_CFLAGS = $(st)
+
 libirc_la_LDFLAGS = -module -avoid-version
 
 if STATIC_IRC
 
 st = -DSTATIC
+noinst_LIBRARIES = libirc.a
 pkg_LTLIBRARIES =
-noinst_LIBRARIES = libirc.a
 
-libirc_a_SOURCES = irc.c
-
-libirc_a_CFLAGS = $(AM_CFLAGS)
+libirc_a_SOURCES = $(IRCSOURCES)
+libirc_a_CFLAGS  = $(AM_CFLAGS)
 
 else
 
@@ -21,6 +23,10 @@
 pkg_LTLIBRARIES = libirc.la
 noinst_LIBRARIES =
 
-libirc_la_SOURCES = irc.c
+libirc_la_SOURCES = $(IRCSOURCES)
 
 endif
+
+AM_CPPFLAGS = \
+	-I$(top_srcdir)/src \
+	$(DEBUG_CFLAGS)
--- a/src/protocols/jabber/Makefile.am	Sat Jan 04 21:01:32 2003 +0000
+++ b/src/protocols/jabber/Makefile.am	Sun Jan 05 03:02:55 2003 +0000
@@ -2,16 +2,7 @@
 
 pkgdir = $(libdir)/gaim
 
-CFLAGS += -I\$(top_srcdir)/src $(st) $(DEBUG_CFLAGS)
-libjabber_la_LDFLAGS = 	-module -avoid-version
-
-if STATIC_JABBER
-
-st = -DSTATIC
-pkg_LTLIBRARIES =
-noinst_LIBRARIES = libjabber.a
-
-libjabber_a_SOURCES = \
+JABBERSOURCES = \
 			asciitab.h \
 			expat.c \
 			genhash.c \
@@ -53,54 +44,27 @@
 			\
 			jabber.c
 
+AM_CFLAGS = $(st)
+
+libjabber_la_LDFLAGS = -module -avoid-version
+
+if STATIC_JABBER
+
+st = -DSTATIC
+noinst_LIBRARIES = libjabber.a
+
+libjabber_a_SOURCES = $(JABBERSOURCES)
 libjabber_a_CFLAGS = $(AM_CFLAGS)
 
 else
 
 st =
 pkg_LTLIBRARIES = libjabber.la
-noinst_LIBRARIES =
 
-libjabber_la_SOURCES = \
-			asciitab.h \
-			expat.c \
-			genhash.c \
-			hashtable.c \
-			hashtable.h \
-			iasciitab.h \
-			karma.c \
-			latin1tab.h \
-			lib.h \
-			libxode.h \
-			nametab.h \
-			pool.c \
-			sha.c \
-			snprintf.c \
-			socket.c \
-			str.c \
-			utf8tab.h \
-			xhash.c \
-			xmldef.h \
-			xmlnode.c \
-			xmlparse.c \
-			xmlparse.h \
-			xmlrole.c \
-			xmlrole.h \
-			xmltok.c \
-			xmltok.h \
-			xmltok_impl.h \
-			xstream.c \
-			\
-			jabber.h \
-			jconn.c \
-			jid.c \
-			jpacket.c \
-			jutil.c \
-			log.c \
-			log.h \
-			pproxy.c \
-			rate.c \
-			\
-			jabber.c
+libjabber_la_SOURCES = $(JABBERSOURCES)
 
 endif
+
+AM_CPPFLAGS = \
+	-I$(top_srcdir)/src \
+	$(DEBUG_CFLAGS)
--- a/src/protocols/msn/Makefile.am	Sat Jan 04 21:01:32 2003 +0000
+++ b/src/protocols/msn/Makefile.am	Sun Jan 05 03:02:55 2003 +0000
@@ -2,25 +2,27 @@
 
 pkgdir = $(libdir)/gaim
 
-CFLAGS += -I\$(top_srcdir)/src $(st) $(DEBUG_CFLAGS)
+MSNSOURCES = msn.c
+
+AM_CFLAGS = $(st)
+
 libmsn_la_LDFLAGS = -module -avoid-version
 
 if STATIC_MSN
 
 st = -DSTATIC
-pkg_LTLIBRARIES =
 noinst_LIBRARIES = libmsn.a
-
-libmsn_a_SOURCES = msn.c
-
-libmsn_a_CFLAGS = $(AM_CFLAGS)
+libmsn_a_SOURCES = $(MSNSOURCES)
+libmsn_a_CFLAGS  = $(AM_CFLAGS)
 
 else
 
 st =
-pkg_LTLIBRARIES = libmsn.la
-noinst_LIBRARIES =
-
-libmsn_la_SOURCES = msn.c
+pkg_LTLIBRARIES   = libmsn.la
+libmsn_la_SOURCES = $(MSNSOURCES)
 
 endif
+
+AM_CPPFLAGS = \
+	-I$(top_srcdir)/src \
+	$(DEBUG_CFLAGS)
--- a/src/protocols/napster/Makefile.am	Sat Jan 04 21:01:32 2003 +0000
+++ b/src/protocols/napster/Makefile.am	Sun Jan 05 03:02:55 2003 +0000
@@ -1,24 +1,26 @@
 pkgdir = $(libdir)/gaim
 
-CFLAGS += -I\$(top_srcdir)/src $(st) $(DEBUG_CFLAGS)
+NAPSTERSOURCES = napster.c
+
+AM_CFLAGS = $(st)
+
 libnapster_la_LDFLAGS = -module -avoid-version
 
 if STATIC_NAPSTER
 
 st = -DSTATIC
-pkg_LTLIBRARIES =
-noinst_LIBRARIES = libnapster.a
-
-libnapster_a_SOURCES = napster.c
-
-libnapster_a_CFLAGS = $(AM_CFLAGS)
+noinst_LIBRARIES     = libnapster.a
+libnapster_a_SOURCES = $(NAPSTERSOURCES)
+libnapster_a_CFLAGS  = $(AM_CFLAGS)
 
 else
 
 st =
-pkg_LTLIBRARIES = libnapster.la
-noinst_LIBRARIES =
-
-libnapster_la_SOURCES = napster.c
+pkg_LTLIBRARIES       = libnapster.la
+libnapster_la_SOURCES = $(NAPSTERSOURCES)
 
 endif
+
+AM_CPPFLAGS = \
+	-I$(top_srcdir)/src \
+	$(DEBUG_CFLAGS)
--- a/src/protocols/oscar/Makefile.am	Sat Jan 04 21:01:32 2003 +0000
+++ b/src/protocols/oscar/Makefile.am	Sun Jan 05 03:02:55 2003 +0000
@@ -1,93 +1,70 @@
-EXTRA_DIST = aim.h aim_cbtypes.h aim_internal.h faimconfig.h md5.h README \
-		CHANGES COPYING BUGS AUTHORS
+EXTRA_DIST = README CHANGES COPYING BUGS AUTHORS
 
 pkgdir = $(libdir)/gaim
 
+OSCARSOURCES = \
+	admin.c        \
+	adverts.c      \
+	aim.h          \
+	aim_cbtypes.h  \
+	aim_internal.h \
+	auth.c         \
+	bos.c          \
+	bstream.c      \
+	buddylist.c    \
+	chat.c         \
+	chatnav.c      \
+	conn.c         \
+	email.c        \
+	faimconfig.h   \
+	ft.c           \
+	icq.c          \
+	im.c           \
+	info.c         \
+	invite.c       \
+	md5.h          \
+	meta.c         \
+	misc.c         \
+	msgcookie.c    \
+	newsearch.c    \
+	popups.c       \
+	rxhandlers.c   \
+	rxqueue.c      \
+	search.c       \
+	service.c      \
+	snac.c         \
+	ssi.c          \
+	stats.c        \
+	tlv.c          \
+	translate.c    \
+	txqueue.c      \
+	util.c         \
+	oscar.c
+
 CURRENT_DATE := $(shell date +%Y%m%d)
 CURRENT_TIME := $(shell date +%H%M%S)
 
-CFLAGS += -DAIM_BUILDDATE=\"$(CURRENT_DATE)\" -DAIM_BUILDTIME=\"$(CURRENT_TIME)\" -I\$(top_srcdir)/src $(st) 
-$(DEBUG_CFLAGS)
-liboscar_la_LDFLAGS =	-module -avoid-version
+AM_CFLAGS = $(st)
+
+liboscar_la_LDFLAGS = -module -avoid-version
 
 if STATIC_OSCAR
 
 st = -DSTATIC
-pkg_LTLIBRARIES =
-noinst_LIBRARIES = liboscar.a
-
-liboscar_a_SOURCES = 	admin.c		\
-			adverts.c	\
-			auth.c 		\
-			bos.c 		\
-			bstream.c 	\
-			buddylist.c	\
-			chat.c		\
-			chatnav.c	\
-			conn.c		\
-			email.c		\
-			ft.c		\
-			icq.c		\
-			im.c		\
-			info.c		\
-			invite.c	\
-			meta.c		\
-			misc.c		\
-			msgcookie.c	\
-			newsearch.c	\
-			popups.c	\
-			rxhandlers.c	\
-			rxqueue.c	\
-			search.c	\
-			service.c	\
-			snac.c		\
-			ssi.c		\
-			stats.c		\
-			tlv.c		\
-			translate.c	\
-			txqueue.c	\
-			util.c		\
-			oscar.c
-
-liboscar_a_CFLAGS = $(AM_CFLAGS)
+noinst_LIBRARIES   = liboscar.a
+liboscar_a_SOURCES = $(OSCARSOURCES)
+liboscar_a_CFLAGS  = $(AM_CFLAGS)
 
 else
 
 st =
-pkg_LTLIBRARIES = liboscar.la
-noinst_LIBRARIES =
-
-liboscar_la_SOURCES = 	admin.c		\
-			adverts.c	\
-			auth.c 		\
-			bos.c 		\
-			bstream.c 	\
-			buddylist.c	\
-			chat.c		\
-			chatnav.c	\
-			conn.c		\
-			email.c		\
-			ft.c		\
-			icq.c		\
-			im.c		\
-			info.c		\
-			invite.c	\
-			meta.c		\
-			misc.c		\
-			msgcookie.c	\
-			newsearch.c	\
-			popups.c	\
-			rxhandlers.c	\
-			rxqueue.c	\
-			search.c	\
-			service.c	\
-			snac.c		\
-			ssi.c		\
-			stats.c		\
-			tlv.c		\
-			translate.c	\
-			txqueue.c	\
-			util.c		\
-			oscar.c
+pkg_LTLIBRARIES     = liboscar.la
+liboscar_la_SOURCES = $(OSCARSOURCES)
 
 endif
+
+AM_CPPFLAGS = \
+	-I$(top_srcdir)/src \
+	$(DEBUG_CFLAGS) \
+	-DAIM_BUILDDATE=\"$(CURRENT_DATE)\" \
+	-DAIM_BUILDTIME=\"$(CURRENT_TIME)\"
--- a/src/protocols/toc/Makefile.am	Sat Jan 04 21:01:32 2003 +0000
+++ b/src/protocols/toc/Makefile.am	Sun Jan 05 03:02:55 2003 +0000
@@ -2,25 +2,27 @@
 
 pkgdir = $(libdir)/gaim
 
-CFLAGS += -I\$(top_srcdir)/src $(st) $(DEBUG_CFLAGS)
+TOCSOURCES = toc.c
+
+AM_CFLAGS = $(st)
+
 libtoc_la_LDFLAGS = -module -avoid-version
 
 if STATIC_TOC
 
 st = -DSTATIC
-pkg_LTLIBRARIES =
 noinst_LIBRARIES = libtoc.a
-
-libtoc_a_SOURCES = toc.c
-
-libtoc_a_CFLAGS = $(AM_CFLAGS)
+libtoc_a_SOURCES = $(TOCSOURCES)
+libtoc_a_CFLAGS  = $(AM_CFLAGS)
 
 else
 
 st =
-pkg_LTLIBRARIES = libtoc.la
-noinst_LIBRARIES =
-
-libtoc_la_SOURCES = toc.c
+pkg_LTLIBRARIES   = libtoc.la
+libtoc_la_SOURCES = $(TOCSOURCES)
 
 endif
+
+AM_CPPFLAGS = \
+	-I$(top_srcdir)/src \
+	$(DEBUG_CFLAGS)
--- a/src/protocols/yahoo/Makefile.am	Sat Jan 04 21:01:32 2003 +0000
+++ b/src/protocols/yahoo/Makefile.am	Sun Jan 05 03:02:55 2003 +0000
@@ -1,26 +1,29 @@
-EXTRA_DIST = md5.h
-
 pkgdir = $(libdir)/gaim
 
-CFLAGS += -I\$(top_srcdir)/src $(st) $(DEBUG_CFLAGS)
+YAHOOSOURCES = \
+	crypt.c \
+	md5.h \
+	yahoo.c
+
+AM_CFLAGS = $(st)
+
 libyahoo_la_LDFLAGS = -module -avoid-version
 
 if STATIC_YAHOO
 
 st = -DSTATIC
-pkg_LTLIBRARIES =
-noinst_LIBRARIES = libyahoo.a
-
-libyahoo_a_SOURCES = crypt.c yahoo.c
-
-libyahoo_a_CFLAGS = $(AM_CFLAGS)
+noinst_LIBRARIES   = libyahoo.a
+libyahoo_a_SOURCES = $(YAHOOSOURCES)
+libyahoo_a_CFLAGS  = $(AM_CFLAGS)
 
 else
 
 st =
-pkg_LTLIBRARIES = libyahoo.la
-noinst_LIBRARIES =
-
-libyahoo_la_SOURCES = crypt.c yahoo.c
+pkg_LTLIBRARIES     = libyahoo.la
+libyahoo_la_SOURCES = $(YAHOOSOURCES)
 
 endif
+
+AM_CPPFLAGS = \
+	-I$(top_srcdir)/src \
+	$(DEBUG_CFLAGS)
--- a/src/protocols/zephyr/Makefile.am	Sat Jan 04 21:01:32 2003 +0000
+++ b/src/protocols/zephyr/Makefile.am	Sun Jan 05 03:02:55 2003 +0000
@@ -1,152 +1,96 @@
 pkgdir = $(libdir)/gaim
 
-CFLAGS += -I\$(top_srcdir)/src -I\$(top_srcdir)/src/protocols -DCONFDIR=\"$(confdir)\" $(KRB4_CFLAGS) $(st) $(DEBUG_CFLAGS)
+ZEPHYRSOURCES = \
+	ZAsyncLocate.c \
+	ZCkAuth.c \
+	ZCkIfNot.c \
+	ZClosePort.c \
+	ZCmpUID.c \
+	ZCmpUIDP.c \
+	ZFlsLocs.c \
+	ZFlsSubs.c \
+	ZFmtAuth.c \
+	ZFmtList.c \
+	ZFmtNotice.c \
+	ZFmtRaw.c \
+	ZFmtRawLst.c \
+	ZFmtSmRLst.c \
+	ZFmtSmRaw.c \
+	ZFreeNot.c \
+	ZGetLocs.c \
+	ZGetSender.c \
+	ZGetSubs.c \
+	ZGetWGPort.c \
+	ZIfNotice.c \
+	ZInit.c \
+	ZLocations.c \
+	ZMakeAscii.c \
+	ZMkAuth.c \
+	ZNewLocU.c \
+	ZOpenPort.c \
+	ZParseNot.c \
+	ZPeekIfNot.c \
+	ZPeekNot.c \
+	ZPeekPkt.c \
+	ZPending.c \
+	ZReadAscii.c \
+	ZRecvNot.c \
+	ZRecvPkt.c \
+	ZRetSubs.c \
+	ZSendList.c \
+	ZSendNot.c \
+	ZSendPkt.c \
+	ZSendRLst.c \
+	ZSendRaw.c \
+	ZSetDest.c \
+	ZSetFD.c \
+	ZSetSrv.c \
+	ZSubs.c \
+	ZVariables.c \
+	ZWait4Not.c \
+	ZhmStat.c \
+	Zinternal.c \
+	com_err.h \
+	error_message.c \
+	error_table.h \
+	et_name.c \
+	init_et.c \
+	internal.h \
+	mit-copyright.h \
+	mit-sipb-copyright.h \
+	sysdep.h \
+	zephyr.h \
+	zephyr_err.c \
+	zephyr_err.h \
+	\
+	zephyr.c
 
-LIBS = @LIBS@ $(KRB4_LDFLAGS) $(KRB4_LIBS)
-libzephyr_la_LDFLAGS = 	-module -avoid-version
+AM_CFLAGS = $(st)
+
+ZEPHYRLIBS = $(KRB4_LDFLAGS) $(KRB4_LIBS)
+
+libzephyr_la_LDFLAGS = -module -avoid-version
 
 if STATIC_ZEPHYR
 
 st = -DSTATIC
-pkg_LTLIBRARIES =
 noinst_LIBRARIES = libzephyr.a
-
-libzephyr_a_SOURCES = \
-			ZAsyncLocate.c \
-			ZCkAuth.c \
-			ZCkIfNot.c \
-			ZClosePort.c \
-			ZCmpUID.c \
-			ZCmpUIDP.c \
-			ZFlsLocs.c \
-			ZFlsSubs.c \
-			ZFmtAuth.c \
-			ZFmtList.c \
-			ZFmtNotice.c \
-			ZFmtRaw.c \
-			ZFmtRawLst.c \
-			ZFmtSmRLst.c \
-			ZFmtSmRaw.c \
-			ZFreeNot.c \
-			ZGetLocs.c \
-			ZGetSender.c \
-			ZGetSubs.c \
-			ZGetWGPort.c \
-			ZIfNotice.c \
-			ZInit.c \
-			ZLocations.c \
-			ZMakeAscii.c \
-			ZMkAuth.c \
-			ZNewLocU.c \
-			ZOpenPort.c \
-			ZParseNot.c \
-			ZPeekIfNot.c \
-			ZPeekNot.c \
-			ZPeekPkt.c \
-			ZPending.c \
-			ZReadAscii.c \
-			ZRecvNot.c \
-			ZRecvPkt.c \
-			ZRetSubs.c \
-			ZSendList.c \
-			ZSendNot.c \
-			ZSendPkt.c \
-			ZSendRLst.c \
-			ZSendRaw.c \
-			ZSetDest.c \
-			ZSetFD.c \
-			ZSetSrv.c \
-			ZSubs.c \
-			ZVariables.c \
-			ZWait4Not.c \
-			ZhmStat.c \
-			Zinternal.c \
-			com_err.h \
-			error_message.c \
-			error_table.h \
-			et_name.c \
-			init_et.c \
-			internal.h \
-			mit-copyright.h \
-			mit-sipb-copyright.h \
-			sysdep.h \
-			zephyr.h \
-			zephyr_err.c \
-			zephyr_err.h \
-			\
-			zephyr.c
-
-libzephyr_a_CFLAGS = $(AM_CFLAGS)
+libzephyr_a_SOURCES = $(ZEPHYRSOURCES)
+libzephyr_a_CFLAGS  = $(AM_CFLAGS)
+libzephyr_a_LIBADD  = $(ZEPHYRLIBS)
 
 else
 
 st =
 pkg_LTLIBRARIES = libzephyr.la
-noinst_LIBRARIES =
-
-libzephyr_la_SOURCES = \
-			ZAsyncLocate.c \
-			ZCkAuth.c \
-			ZCkIfNot.c \
-			ZClosePort.c \
-			ZCmpUID.c \
-			ZCmpUIDP.c \
-			ZFlsLocs.c \
-			ZFlsSubs.c \
-			ZFmtAuth.c \
-			ZFmtList.c \
-			ZFmtNotice.c \
-			ZFmtRaw.c \
-			ZFmtRawLst.c \
-			ZFmtSmRLst.c \
-			ZFmtSmRaw.c \
-			ZFreeNot.c \
-			ZGetLocs.c \
-			ZGetSender.c \
-			ZGetSubs.c \
-			ZGetWGPort.c \
-			ZIfNotice.c \
-			ZInit.c \
-			ZLocations.c \
-			ZMakeAscii.c \
-			ZMkAuth.c \
-			ZNewLocU.c \
-			ZOpenPort.c \
-			ZParseNot.c \
-			ZPeekIfNot.c \
-			ZPeekNot.c \
-			ZPeekPkt.c \
-			ZPending.c \
-			ZReadAscii.c \
-			ZRecvNot.c \
-			ZRecvPkt.c \
-			ZRetSubs.c \
-			ZSendList.c \
-			ZSendNot.c \
-			ZSendPkt.c \
-			ZSendRLst.c \
-			ZSendRaw.c \
-			ZSetDest.c \
-			ZSetFD.c \
-			ZSetSrv.c \
-			ZSubs.c \
-			ZVariables.c \
-			ZWait4Not.c \
-			ZhmStat.c \
-			Zinternal.c \
-			com_err.h \
-			error_message.c \
-			error_table.h \
-			et_name.c \
-			init_et.c \
-			internal.h \
-			mit-copyright.h \
-			mit-sipb-copyright.h \
-			sysdep.h \
-			zephyr.h \
-			zephyr_err.c \
-			zephyr_err.h \
-			\
-			zephyr.c
+libzephyr_la_SOURCES = $(ZEPHYRSOURCES)
+libzephyr_la_LIBADD  = $(ZEPHYRLIBS)
 
 endif
+
+AM_CPPFLAGS = \
+	-I$(top_srcdir)/src \
+	-I\$(top_srcdir)/src/protocols \
+	-DCONFDIR=\"$(confdir)\" \
+	$(KRB4_CFLAGS) \
+	$(DEBUG_CFLAGS)