build: Split off the test-related Makefile template