improve makefiles
improve the way makefiles handle cross-compilation