dit ?= .1
dah ?= .3
sounds := dit dah
DRYRUN ?= --dry-run
export
all: wavs mp3s oggs test
set:
	set
wavs: $(addsuffix .wav, $(sounds))
mp3s: $(addsuffix .mp3, $(sounds))
oggs: $(addsuffix .ogg, $(sounds))
# this rule must come before %.wav
%length.wav:
	sox -n $@ synth $($*) sine 0
%.wav:
	sox -n $@ synth $($*) sine 1200
%length.ogg:
	sox -n $@ synth $($*) sine 0
%.ogg:
	sox -n $@ synth $($*) sine 1200
%length.mp3:
	sox -n $@ synth $($*) sine 0
%.mp3:
	sox -n $@ synth $($*) sine 1200
test: morse.html
	google-chrome file://$(PWD)/$<
upload:
	for server in www tek; do \
	 rsync -avuz $(DRYRUN) . $$server:www/www/src/morsecode; \
	done
