aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2011-01-26 21:14:59 -0500
committerKevin O'Connor <kevin@koconnor.net>2011-01-29 09:44:10 -0500
commit0da7bfdf21b2bbbfd74178f2943cd4efc9f995c5 (patch)
tree133875f2230b00e890ee49aebaf8ddc9cfa26035 /tools
parenta4c5daf0e2545361fadcad3015e10f8b23e53926 (diff)
downloadseabios-0da7bfdf21b2bbbfd74178f2943cd4efc9f995c5.tar.gz
Build changes for Linux kconfig code to work in seabios dir structure.
Diffstat (limited to 'tools')
-rw-r--r--tools/kconfig/Makefile29
-rw-r--r--tools/kconfig/POTFILES.in24
-rw-r--r--tools/kconfig/gconf.c2
-rw-r--r--tools/kconfig/kconfig_load.c2
4 files changed, 32 insertions, 25 deletions
diff --git a/tools/kconfig/Makefile b/tools/kconfig/Makefile
index 368ae306..890243b1 100644
--- a/tools/kconfig/Makefile
+++ b/tools/kconfig/Makefile
@@ -30,8 +30,9 @@ oldconfig: $(obj)/conf
$< --$@ $(Kconfig)
silentoldconfig: $(obj)/conf
+ @echo " Build Kconfig config file"
$(Q)mkdir -p include/generated
- $< --$@ $(Kconfig)
+ $(Q)$< --$@ $(Kconfig)
# if no path is given, then use src directory to find file
ifdef LSMOD
@@ -80,7 +81,7 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
$(Q)xgettext --default-domain=linux \
--add-comments --keyword=_ --keyword=N_ \
--from-code=UTF-8 \
- --files-from=scripts/kconfig/POTFILES.in \
+ --files-from=tools/kconfig/POTFILES.in \
--output $(obj)/config.pot
$(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot
$(Q)ln -fs Kconfig.i386 arch/um/Kconfig.arch
@@ -109,15 +110,8 @@ savedefconfig: $(obj)/conf
$< --$@=defconfig $(Kconfig)
defconfig: $(obj)/conf
-ifeq ($(KBUILD_DEFCONFIG),)
- $< --defconfig $(Kconfig)
-else
- @echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
- $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
-endif
-
-%_defconfig: $(obj)/conf
- $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
+ @echo " Build default config"
+ $(Q)$< --defconfig=/dev/null $(Kconfig)
# Help text used by make help
help:
@@ -352,3 +346,16 @@ lex.%.c: %.l
cp $@ $@_shipped
endif
+
+VPATH := $(srctree)
+
+$(obj)/%:: $(src)/%_shipped
+ $(Q)cat $< > $@
+
+host-cobjs := $(sort $(foreach m,$(hostprogs-y),$($(m)-objs)))
+host-cobjs := $(addprefix $(obj)/,$(host-cobjs))
+hostprogs-y := $(addprefix $(obj)/,$(hostprogs-y))
+$(host-cobjs) : $(obj)/%.o : $(src)/%.c
+ $(Q)$(HOSTCC) -I$(obj) -I$(srctree)/$(src) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) $(HOST_EXTRACFLAGS) -c -o $@ $<
+$(hostprogs-y) : $(obj)/% : $(host-cobjs)
+ $(Q)$(HOSTCC) $(HOSTLDFLAGS) -o $@ $(addprefix $(obj)/,$($(@F)-objs)) $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
diff --git a/tools/kconfig/POTFILES.in b/tools/kconfig/POTFILES.in
index 96745739..f0baccdb 100644
--- a/tools/kconfig/POTFILES.in
+++ b/tools/kconfig/POTFILES.in
@@ -1,12 +1,12 @@
-scripts/kconfig/lxdialog/checklist.c
-scripts/kconfig/lxdialog/inputbox.c
-scripts/kconfig/lxdialog/menubox.c
-scripts/kconfig/lxdialog/textbox.c
-scripts/kconfig/lxdialog/util.c
-scripts/kconfig/lxdialog/yesno.c
-scripts/kconfig/mconf.c
-scripts/kconfig/conf.c
-scripts/kconfig/confdata.c
-scripts/kconfig/gconf.c
-scripts/kconfig/gconf.glade.h
-scripts/kconfig/qconf.cc
+tools/kconfig/lxdialog/checklist.c
+tools/kconfig/lxdialog/inputbox.c
+tools/kconfig/lxdialog/menubox.c
+tools/kconfig/lxdialog/textbox.c
+tools/kconfig/lxdialog/util.c
+tools/kconfig/lxdialog/yesno.c
+tools/kconfig/mconf.c
+tools/kconfig/conf.c
+tools/kconfig/confdata.c
+tools/kconfig/gconf.c
+tools/kconfig/gconf.glade.h
+tools/kconfig/qconf.cc
diff --git a/tools/kconfig/gconf.c b/tools/kconfig/gconf.c
index 45589616..b7f31f20 100644
--- a/tools/kconfig/gconf.c
+++ b/tools/kconfig/gconf.c
@@ -1521,7 +1521,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, "/tools/kconfig/gconf.glade", NULL);
else if (av[0][0] == '/')
glade_file = g_strconcat(av[0], ".glade", NULL);
else
diff --git a/tools/kconfig/kconfig_load.c b/tools/kconfig/kconfig_load.c
index dbdcaad8..2d0cff8e 100644
--- a/tools/kconfig/kconfig_load.c
+++ b/tools/kconfig/kconfig_load.c
@@ -15,7 +15,7 @@ void kconfig_load(void)
handle = dlopen("./libkconfig.so", RTLD_LAZY);
if (!handle) {
- handle = dlopen("./scripts/kconfig/libkconfig.so", RTLD_LAZY);
+ handle = dlopen("./tools/kconfig/libkconfig.so", RTLD_LAZY);
if (!handle) {
fprintf(stderr, "%s\n", dlerror());
exit(1);