CC      = gcc
#INCDIR  = -I sndstretch
CFLAGS  = -Wall -O6 $(INCDIR)

# maybe you will have to change this
XMMS_PLUGIN_DIR = /usr/X11/lib/xmms/Output

xmms_plugin: sndstretch_xmms.lo sndstretch.lo
	$(CC) -shared sndstretch_xmms.lo sndstretch.lo `gtk-config --libs` -lgthread -lpthread -lpthread -lc -o sndstretch_xmms.so

sndstretch_xmms.lo: sndstretch_xmms.h sndstretch_xmms.c
	$(CC) $(CFLAGS) -O2 -fPIC -c sndstretch_xmms.c `gtk-config --cflags` -o sndstretch_xmms.lo
        
sndstretch.lo: sndstretch.c sndstretch.h
	$(CC) $(CFLAGS) -O2 -fPIC -c sndstretch.c -o sndstretch.lo

install:
	install sndstretch_xmms.so $(XMMS_PLUGIN_DIR)
        
clean:
	rm -f *~ ; rm -f *.o ; rm -f *.so *.lo
