Split Makefile to library and testsuite parts