kbuild: export HOSTCXX and HOSTCXXFLAGS

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
kbuild: fix a typo in scripts/Makefile.host
kbuild: fix a bug of C++ host program handling

The comment lines claim:
  C++ executables compiled from at least one .cc file
  and zero or more .c files

But C++ executables with zero .c file fail in build.

For example, assume Makefile is like this:

  hostprogs-y := foo
  foo-cxxobjs := bar.o

In this case, foo is treated as host-csingle.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
kbuild: clean up scripts/Makefile.host

$(dir $(f)) always returns non-empty string.

So, $(if $(dir $(f)),$(dir $(f)) is equivalent to $(dir $(f)).

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
kbuild: clean-up and bug fix of scripts/Makefile.host

Assume we have a Makefile like this:

  hostprogs-y := foo
  foo-cxxobjs := bar/baz.o
  foo-objs := qux/quux.o

In this case, Kbuild creates bar/ directory,
but fails to create qux/ directory.

This commit re-writes directory creation more simply,
fixing that bug.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
kbuild: create directory of .o files from shlib-objs notation

Assume we have a Makefile like this:

  hostprogs-y := foo
  foo-objs := bar.o baz.so
  baz-objs := qux/quux.o

In this case, Kbuild fails to create qux/ directory.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
tools: refactor HOSTLOADLIBES_* options

The tools mkimage, dumpimage, fit_info, fit_check_sign
always have the common libraries to be linked,
so HOSTLOADLIBES_* can be consolidated a little bit.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
tools: avoid including source fileso