makefile & minor fixes for linux