

all:
	@echo "make test                    : compile the testbench"
	@echo "make gen_filtered_wave       : run the test to filter the noisy wave file"
	@echo "make gen_short_filtered_wave : run the test to filter the SHORT noisy wave file"
	@echo "make play_original_wave      : play the original wave file without sine noise."
	@echo "make play_noisy_wave         : play the wave file including a 8kHz sine wave."
	@echo "make play_filtered_wave      : play the filtered file including a 8kHz sine wave."
	@echo "make clean                   : cleanup all generated files"


play_original_wave: ../waves/piano2_ref.wav
	mpv $<

play_noisy_wave: ../waves/piano2_noisy.wav
	mpv $<

play_filtered_wave: ../waves/piano2_filtered.wav
	mpv $<

../waves/piano2_filtered.wav: test ../waves/piano2_noisy.wav
	./test  ../waves/piano2_noisy.wav $@

../waves/piano2_short_filtered.wav: test ../waves/piano2_short_noisy.wav
	./test  ../waves/piano2_short_noisy.wav $@

gen_filtered_wave: ../waves/piano2_filtered.wav
gen_short_filtered_wave: ../waves/piano2_short_filtered.wav

test: main.cpp SampleFilter.cpp
	g++ -o test main.cpp  SampleFilter.cpp   ../wavelib/lib/libwave.a

clean:
	@rm -f test
	@rm -f ../waves/piano2_filtered.wav

