Various makefile fixes for the test environment.

6 files changed