CFLAGS = -O -I../csound/installed/include -L../csound/installed/lib/`machinetype`

.SUFFIXES: .scot .sco .srt .orc .ulaw .play .rept .avr

.sco.play:
	perf -u -N- $*.orc $*.sco | play
	rm -f score.srt orch.orc

.avr.play:
	convert -h -ic < $*.avr | lintoulaw | speed 1.953 | play

.ulaw.rept:
	while true ; do cat $*.ulaw; done | play

.sco.ulaw:
	perf -u -N- $*.orc $*.sco > $*.ulaw
	rm -f score.srt orch.orc

.scot.sco:
	scot $*.scot
	mv -f score $*.sco

# Dummy suffix to make it happen
# .srt.play:
#	csound -u -N- $*.orc < $*.srt | play

default:
	@echo 'make what?'

scroll: scroll.c
	cc $(CFLAGS) -o scroll scroll.c -lcscore

clean:
	rm -f *.srt it3.sco scroll

time: it3.sco
	rm -f orch.orc
	time perf -N /dev/null wobba.orc it3.sco
	rm -f score.srt orch.orc
