summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2010-06-20 23:05:32 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2010-06-21 22:16:34 +0200
commit2cc210c92fec4dd2977dd6022ddc1e0b77f4c269 (patch)
tree2886368c3a11cf821392a67fd9cd3c0dd9b4970e /package
parent2691d80803c96e32d923b0a20708b2dcb9aac20a (diff)
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')
-rw-r--r--package/config/Makefile24
-rw-r--r--package/config/gconf.c2
2 files changed, 15 insertions, 11 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 $< > $@
diff --git a/package/config/gconf.c b/package/config/gconf.c
index b8a1661a9..7c4c76cf6 100644
--- a/package/config/gconf.c
+++ b/package/config/gconf.c
@@ -1576,7 +1576,7 @@ int main(int ac, char *av[])
/* Determine GUI path */
env = getenv(SRCTREE);
if (env)
- glade_file = g_strconcat(env, "/scripts/kconfig/gconf.glade", NULL);
+ glade_file = g_strconcat(env, "/package/config/gconf.glade", NULL);
else if (av[0][0] == '/')
glade_file = g_strconcat(av[0], ".glade", NULL);
else