Kbuild & Makefile: fixe the problem of generating object files under the source tree

by setting to use the $(M) passed from build/build.sh which is a path
relative to the kernel source tree.

And update to use $(srctree) to specify absolute paths
for the -I ccflags options to workaround local header files not found problem

Test: with command BUILD_CONFIG=common/build.config.hikey960 ./build/build.sh
      and no object files generated under the modules source directory

Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Change-Id: Ia772f5234d36cd4bf711cbff077e0355a2ac1489
2 files changed
tree: 37c6c7bee9c130c8ae4ac7dc7b584d0a62c49c55
  1. midgard/