refactored makefile for better multiplatform support