PIDGIN_CFLAGS = @PIDGIN_CFLAGS@
AUD_CFLAGS = @AUD_CFLAGS@
DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@
CFLAGS += -fPIC -shared -Wall $(PIDGIN_CFLAGS) $(AUD_CFLAGS) $(DBUS_GLIB_CFLAGS)

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)

PIDGIN_LIB_DIR = @PIDGIN_LIB_DIR@


default: pidgin-audacious.so

pidgin-audacious.so: pidgin-audacious.c
	gcc -o $@ $< $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -g


install: pidgin-audacious.so
	install -d $(DESTDIR)$(PIDGIN_LIB_DIR)/pidgin
	install -m 755 pidgin-audacious.so $(DESTDIR)$(PIDGIN_LIB_DIR)/pidgin


clean:
	rm -f pidgin-audacious.so


distclean: clean
	rm -f Makefile config.log config.status *~
	rm -rf autom4te.cache
