diff Makefile.in @ 22:fbad40babe88

build system update: - ported Makefile.in from pidgin-twitter. - ported autogen.sh from pidgin-twitter. - moved some declarations and definitions to pidgin-audacious.h - updated configure.in to go along with new Makefile. - removed aclocal.m4 from version control.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Mon, 06 Oct 2008 18:18:06 +0900
parents dc3aa0bf24c0
children 1d6975f2b5b3
line wrap: on
line diff
--- a/Makefile.in	Sun Oct 05 14:19:55 2008 +0900
+++ b/Makefile.in	Mon Oct 06 18:18:06 2008 +0900
@@ -1,32 +1,46 @@
-TARGET = pidgin-audacious3.so
+OBJECTIVE = pidgin-audacious3.so
+SRC = pidgin-audacious.c
+HDR = ${SRC:.c=.h}
+
+PIDGIN_PLUGIN_DIR = @PIDGIN_PREFIX@/lib/pidgin
+PIDGIN_DATA_DIR = @PIDGIN_PREFIX@/share
+
 PIDGIN_CFLAGS = @PIDGIN_CFLAGS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
 AUD_CFLAGS = @AUD_CFLAGS@
 DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@
-CFLAGS = -fPIC -shared -Wall $(PIDGIN_CFLAGS) $(AUD_CFLAGS) $(DBUS_GLIB_CFLAGS)
+CFLAGS = -fPIC -shared -Wall $(PIDGIN_CFLAGS) $(GLIB_CFLAGS) $(AUD_CFLAGS) $(DBUS_GLIB_CFLAGS) -DDATADIR=\"$(PIDGIN_DATA_DIR)\"
 
+GLIB_LIBS = @GLIB_LIBS@
 AUD_LIBS = @AUD_LIBS@
 AUD_LIB_DIR = @AUD_LIB_DIR@
 DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@
 DBUS_GLIB_LIB_DIR = @DBUS_GLIB_LIB_DIR@
-LDFLAGS = $(AUD_LIBS) $(DBUS_GLIB_LIBS)
+LDFLAGS = $(AUD_LIBS) $(DBUS_GLIB_LIBS) $(GLIB_LIBS)
 
-PIDGIN_LIB_DIR = @PIDGIN_LIB_DIR@
+all: $(OBJECTIVE)
 
 
-default: $(TARGET)
-
-$(TARGET): pidgin-audacious.c
-	gcc -o $@ $< $(CFLAGS) $(LDFLAGS) -g -Wl,-rpath=$(AUD_LIB_DIR)
+$(OBJECTIVE): $(SRC) $(HDR)
+	gcc -o $@ $(SRC) $(CFLAGS) $(LDFLAGS) -g -Wl,-rpath=$(AUD_LIB_DIR)
 
 
-install: $(TARGET)
-	install -m 755 $(TARGET) $(PIDGIN_LIB_DIR)/pidgin
+install: $(OBJECTIVE)
+	install -m 755 $(OBJECTIVE) $(PIDGIN_PLUGIN_DIR)
 
 
 clean:
-	rm -f $(TARGET)
+	rm -f $(OBJECTIVE)
 
 
 distclean: clean
-	rm -f Makefile config.log config.status *~
-	rm -rf autom4te.cache
+	rm -f Makefile config.log config.status
+
+
+maintainer-clean: distclean
+	rm -rf autom4te.cache aclocal.m4 *~
+
+
+release: maintainer-clean
+	rm -f .hgtags
+	rm -rf .hg