diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-06-28 10:47:05 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-06-28 10:47:05 +0000 |
commit | afc61c6e8e3f9d0065c2328d4a01227cfa71ba5d (patch) | |
tree | 3bd6cea1b52905b42bb76eadb83f2b76c037799a | |
parent | a665ed34960bf1423cba303276161bf44a9851f4 (diff) |
- adjust infrastructure for new kconfig
-rw-r--r-- | Makefile | 58 | ||||
-rw-r--r-- | package/Makefile.in | 24 |
2 files changed, 56 insertions, 26 deletions
@@ -37,6 +37,58 @@ ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) -include $(TOPDIR).config endif +# To put more focus on warnings, be less verbose as default +# Use 'make V=1' to see the full commands +ifdef V + ifeq ("$(origin V)", "command line") + KBUILD_VERBOSE = $(V) + endif +endif +ifndef KBUILD_VERBOSE + KBUILD_VERBOSE = 0 +endif + +ifeq ($(KBUILD_VERBOSE),1) + quiet = + Q = +else + quiet=quiet_ + Q = @ +endif + +CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ + else if [ -x /bin/bash ]; then echo /bin/bash; \ + else echo sh; fi ; fi) + +export CONFIG_SHELL quiet Q KBUILD_VERBOSE + +ifndef HOSTAR +HOSTAR:=ar +endif +ifndef HOSTAS +HOSTAS:=as +endif +ifndef HOSTCC +HOSTCC:=gcc +else +endif +ifndef HOSTCXX +HOSTCXX:=g++ +endif +ifndef HOSTLD +HOSTLD:=ld +endif +HOSTAR:=$(shell $(CONFIG_SHELL) which $(HOSTAR) || type -p $(HOSTAR) || echo ar) +HOSTAS:=$(shell $(CONFIG_SHELL) which $(HOSTAS) || type -p $(HOSTAS) || echo as) +HOSTCC:=$(shell $(CONFIG_SHELL) which $(HOSTCC) || type -p $(HOSTCC) || echo gcc) +HOSTCXX:=$(shell $(CONFIG_SHELL) which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++) +HOSTLD:=$(shell $(CONFIG_SHELL) which $(HOSTLD) || type -p $(HOSTLD) || echo ld) +ifndef CFLAGS_FOR_BUILD +CFLAGS_FOR_BUILD:="-g -O2" +endif +export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTLD + + ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y) # cc-option @@ -212,12 +264,14 @@ all: menuconfig # --------------------------------------------------------------------------- $(CONFIG)/conf: - $(MAKE) -C $(CONFIG) conf + $(MAKE) CC="$(HOSTCC)" CFLAGS=$(CFLAGS_FOR_BUILD) MAKECMDGOALS="$(MAKECMDGOALS)" \ + -C $(CONFIG) conf -@if [ ! -f .config ] ; then \ cp $(CONFIG_DEFCONFIG) .config; \ fi $(CONFIG)/mconf: - $(MAKE) -C $(CONFIG) ncurses conf mconf + $(MAKE) CC="$(HOSTCC)" CFLAGS=$(CFLAGS_FOR_BUILD) MAKECMDGOALS="$(MAKECMDGOALS)" \ + -C $(CONFIG) conf mconf -@if [ ! -f .config ] ; then \ cp $(CONFIG_DEFCONFIG) .config; \ fi diff --git a/package/Makefile.in b/package/Makefile.in index 6efcbd87d..470c45d19 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -48,30 +48,6 @@ TARGET_LDFLAGS=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib endif ######################################################################### -ifndef HOSTAR -HOSTAR:=ar -endif -ifndef HOSTAS -HOSTAS:=as -endif -ifndef HOSTCC -HOSTCC:=gcc -endif -ifndef HOSTCXX -HOSTCXX:=g++ -endif -ifndef HOSTLD -HOSTLD:=ld -endif -HOSTAR:=$(shell which $(HOSTAR) || type -p $(HOSTAR) || echo ar) -HOSTAS:=$(shell which $(HOSTAS) || type -p $(HOSTAS) || echo as) -HOSTCC:=$(shell which $(HOSTCC) || type -p $(HOSTCC) || echo gcc) -HOSTCXX:=$(shell which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++) -HOSTLD:=$(shell which $(HOSTLD) || type -p $(HOSTLD) || echo ld) -ifndef CFLAGS_FOR_BUILD -CFLAGS_FOR_BUILD:="-g -O2" -endif - BASE_DIR:=$(shell pwd) |