fixed makefile bugs, not quite ready for all plateform yet