build: move test rules to tests/Makefile