Add makefile for Linux compilation

Fix several compilation warnings