all: testmeta testmovie1 testmovie2

testmeta:
	rm -rf meta_input
	cp -r test_meta meta_input
	find meta_input -type d -name '.svn' | xargs rm -rf
	make -C meta_input -f Makefile.OSX
	mkdir meta_output
	../../build/Development/bmfdecompress meta.bmf meta_output
	diff -rq meta_input meta_output
	rm -rf meta_output meta_input meta.bmf

testmovie1:
	../../build/Development/bmfcompress 25 10 movie1.bmf test_movie
	md5 movie1.bmf > movie1.md5
	diff -q movie1.md5 movie1.txt
	rm -f movie1.bmf movie1.md5

testmovie2:
	../../build/Development/bmfcompress 25 10 movie2.bmf test_movie movie.ogg
	md5 movie2.bmf > movie2.md5
	diff -q movie2.md5 movie2.txt
	rm -f movie2.bmf movie2.md5


clean:
	rm -rf meta_input meta_output meta.bmf movie1.bmf movie2.bmf movie1.md5 movie2.md5
