SHELL = /bin/sh
VPATH = @srcdir@

top_srcdir = @top_srcdir@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
infodir = @infodir@
libdir = @libdir@
mandir = @mandir@

CC = @CC@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@ @LIBS@
INSTALL = @INSTALL@


BASENAMES = cdparanoia\
	8hz-mp3\
	encode\
	lame\
	gogo\
	bladeenc\
	xingmp3enc\
	l3enc\
	mp3enc\
	oggenc

PLUGINS = $(addprefix ripperX_plugin-, $(BASENAMES))

PLUGIN_OFILES = $(addsuffix .o, $(PLUGINS))

PLUGIN_CFILES = $(addsuffix .c, $(PLUGINS))


all: ripperX_plugin_tester $(PLUGINS)

.c.o:
	$(CC) $(CFLAGS) $(LDFLAGS) -c $< -o $@

install:
	../mkinstalldirs $(bindir)
	for plugin in $(PLUGINS); do $(INSTALL) $$plugin $(bindir); done

uninstall:
	for plugin in $(PLUGINS); do rm -f $(bindir)/$$plugin; done

clean:
	rm -f ripperX_plugin_tester ripperX_plugin_tester.o
	rm -f $(PLUGINS) $(PLUGIN_OFILES)

distclean: clean
	rm -f Makefile config.status config.cache config.log

depend:
	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' Makefile > Makefile.tmp
	echo '# DO NOT DELETE THIS LINE - make depend uses it' >> Makefile.tmp
	echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile.tmp
	$(CC) $(CFLAGS) -M ripperX_plugin_tester.c $(PLUGIN_CFILES) >> Makefile.tmp
	echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile.tmp
	echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile.tmp
	echo '# see make depend above' >> Makefile.tmp
	mv -f Makefile.tmp Makefile

#----------------------------------------------------------
# DO NOT DELETE THIS LINE - make depend uses it
# DEPENDENCIES MUST END AT END OF FILE
