few fix after makefile refactored for mac os x too & solve some compilation warnings