Improve Linux compatibility, add makefile