CCOPT = -O6

# Global XMMS directory
PLAYER_DIR = "\"`xmms-config --input-plugin-dir`/Meta\""
PLUGIN_DIR = "`xmms-config --input-plugin-dir`"

# Local home XMMS directory
#PLAYER_DIR = "\"${HOME}/.xmms/Plugins/Meta\""
#PLUGIN_DIR = "${HOME}/.xmms/Plugins/Input"

all: libmetainput.so

install: all
	cp -f libmetainput.so ${PLUGIN_DIR}

libmetainput.so: meta-input.c
	gcc ${CCOPT} -shared `xmms-config --cflags` `xmms-config --libs` -DPLAYER_DIR=${PLAYER_DIR} -o libmetainput.so meta-input.c
	@echo
	@echo ======================================
	@echo "The meta-input players directory is:"
	@echo ${PLAYER_DIR}
	@echo "Please put your players there."
	@echo "(or change it in the makefile and"
	@echo "recompile...)"
	@echo ======================================
	@echo
clean:
	rm -f *.o libmetainput.so
