SUBDIRS=$(sort $(ALL_OMK_SUBDIRS) ffmpeg)
-test:
- ./_compiled/bin/recorder -i snapshot%02d.png -y test_normal.mp4
- ./_compiled/bin/recorder -i snapshot%02d.png -y -direct test_direct.mp4
- hexdump -C test_normal.mp4 > test_normal.hex
- hexdump -C test_direct.mp4 > test_direct.hex
- kdiff3 test_normal.hex test_direct.hex
+test: run_diff
+
+.PHONY: test run_diff
+
+test_direct.mp4: RECFLAGS=-direct
+test_%.mp4: _compiled/bin/recorder
+ ./_compiled/bin/recorder -i snapshot%02d.png -y $(RECFLAGS) $@ 2>&1 | tee $@.log
+%.hex: %.mp4
+ hexdump -C $< > $@
+run_diff: test_normal.hex test_direct.hex
+ kdiff3 $^