More generic and maintainable makefile. Fixes #348

- implicit recipes
- wildcard glob of C++ files in directory