Move test running in a separate function.
Improve Makefile a bit.

Add a mrproper target to clean configuration as well as build
intermediates, fix plugin.mk to use simple variables, and add
all/clean/install/mrproper rule to PHONY.
Use platform files to determine compilation flags of modules
Fix clean and install targets when building multiple plugins