Makefile: move some variable definitions to the top Makefile
This commit moves some variable definitions from config.mk
to the top Makefile:
- HOSTCC, HOSTCFLAGS, HOSTLDFLAGS
- AS, LD, CC, CPP, etc.
- SHELL (renamed to CONFIG_SHELL)
I'd like to slim down config.mk file
because it is included from all recursive make.
It is redundant to re-define the variables
every time descending into sub directories.
We should rather define them at the top Makefile
and export them.
U-Boot makefiles has been used "SHELL" variable to store shell
chosen for the user, whereas Linux Kernel uses "CONFIG_SHELL".
We should never use "SHELL" variable because it is
a special variable for GNU Make.
Changing SHELL may cause unpredictable side effects
whose root cause is usually difficult to find.
We should use a generic variable name "CONFIG_SHELL".
We should not use the syntax as follows either:
rm -f $(obj)tools/env/{fw_printenv,fw_setenv}
This depends on "bash" although GNU Make generally
invokes "sh" to run the each rule.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>