X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=scripts%2FMakefile.host;fp=scripts%2FMakefile.host;h=060f4c563a5cd0973559b6804a2e1d76ddfadd2a;hb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;hp=2d519704b8fd7993775bfc75cd40520631b06d39;hpb=4e76c8a9fa413ccc09d3f7f664183dcce3555d57;p=linux-2.6.git diff --git a/scripts/Makefile.host b/scripts/Makefile.host index 2d519704b..060f4c563 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host @@ -30,11 +30,11 @@ # libkconfig.so as the executable conf. # Note: Shared libraries consisting of C++ files are not supported -__hostprogs := $(sort $(hostprogs-y)$(hostprogs-m)) +__hostprogs := $(sort $(hostprogs-y) $(hostprogs-m)) # hostprogs-y := tools/build may have been specified. Retreive directory -obj-dirs += $(foreach f,$(__hostprogs), $(if $(dir $(f)),$(dir $(f)))) -obj-dirs := $(strip $(sort $(filter-out ./,$(obj-dirs)))) +host-objdirs := $(foreach f,$(__hostprogs), $(if $(dir $(f)),$(dir $(f)))) +host-objdirs := $(strip $(sort $(filter-out ./,$(host-objdirs)))) # C code @@ -73,13 +73,17 @@ host-cxxmulti := $(addprefix $(obj)/,$(host-cxxmulti)) host-cxxobjs := $(addprefix $(obj)/,$(host-cxxobjs)) host-cshlib := $(addprefix $(obj)/,$(host-cshlib)) host-cshobjs := $(addprefix $(obj)/,$(host-cshobjs)) -obj-dirs := $(addprefix $(obj)/,$(obj-dirs)) +host-objdirs := $(addprefix $(obj)/,$(host-objdirs)) + +obj-dirs += $(host-objdirs) ##### # Handle options to gcc. Support building with separate output directory -_hostc_flags = $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS_$(*F).o) -_hostcxx_flags = $(HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) $(HOSTCXXFLAGS_$(*F).o) +_hostc_flags = $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \ + $(HOSTCFLAGS_$(basetarget).o) +_hostcxx_flags = $(HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \ + $(HOSTCXXFLAGS_$(basetarget).o) ifeq ($(KBUILD_SRC),) __hostc_flags = $(_hostc_flags)