diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2010-06-20 23:05:32 +0200 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2010-06-21 22:16:34 +0200 |
commit | 2cc210c92fec4dd2977dd6022ddc1e0b77f4c269 (patch) | |
tree | 2886368c3a11cf821392a67fd9cd3c0dd9b4970e /package/config/Makefile | |
parent | 2691d80803c96e32d923b0a20708b2dcb9aac20a (diff) | |
download | buildroot-novena-2cc210c92fec4dd2977dd6022ddc1e0b77f4c269.tar.gz buildroot-novena-2cc210c92fec4dd2977dd6022ddc1e0b77f4c269.zip |
kconfig: build in BUILD_DIR/buildroot-config
This way the main buildroot dir can be completely read-only for
out-of-tree builds
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/config/Makefile')
-rw-r--r-- | package/config/Makefile | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/package/config/Makefile b/package/config/Makefile index 197c50026..34cc4b705 100644 --- a/package/config/Makefile +++ b/package/config/Makefile @@ -1,4 +1,3 @@ -obj := . src := . top_srcdir=../../ top_builddir=../../ @@ -16,23 +15,28 @@ host-cmulti := $(foreach m,$(__hostprogs),\ $(if $($(m)-cxxobjs),,$(if $($(m)-objs),$(m)))) host-cxxmulti := $(foreach m,$(__hostprogs),\ $(if $($(m)-cxxobjs),$(m),$(if $($(m)-objs),))) -host-cobjs := $(sort $(foreach m,$(__hostprogs),$($(m)-objs))) -host-cxxobjs := $(sort $(foreach m,$(__hostprogs),$($(m)-cxxobjs))) +host-cobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-objs)))) +host-cxxobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-cxxobjs)))) + +HOST_EXTRACFLAGS += -I$(obj) $(host-csingle): %: %.c - $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< $(HOST_LOADLIBES) -o $@ + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< $(HOST_LOADLIBES) -o $(obj)/$@ $(host-cmulti): %: $(host-cobjs) $(host-cshlib) - $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $($@-objs) $(HOST_LOADLIBES) $(HOSTLOADLIBES_$@) -o $@ + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs)) $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@ $(host-cxxmulti): %: $(host-cxxobjs) $(host-cobjs) $(host-cshlib) - $(HOSTCXX) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$@) $($@-objs) $($@-cxxobjs) $(HOSTLOADLIBES_$@) -o $@ + $(HOSTCXX) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs) $($(@F)-cxxobjs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@ + +$(obj)/%.o: %.c + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@ -$(host-cobjs): %.o: %.c - $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) -c $< -o $@ +$(obj)/%.o: $(obj)/%.c + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@ -$(host-cxxobjs): %.o: %.cc - $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$@) -c $< -o $@ +$(obj)/%.o: %.cc + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$(@F)) -c $< -o $@ $(obj)/%:: $(src)/%_shipped $(Q)cat $< > $@ |