Support ubuntu 14.04

Cleaned up the makefile and added support for compiling on ubuntu 14.04