Adding make generation for tests
Solved compilation problems with tests