[Ticket #27] Make sneaker be able to build under both Ubuntu and OS X

Makefile refactoring