diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2011-01-26 21:14:59 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2011-01-29 09:44:10 -0500 |
commit | 0da7bfdf21b2bbbfd74178f2943cd4efc9f995c5 (patch) | |
tree | 133875f2230b00e890ee49aebaf8ddc9cfa26035 | |
parent | a4c5daf0e2545361fadcad3015e10f8b23e53926 (diff) | |
download | seabios-hppa-0da7bfdf21b2bbbfd74178f2943cd4efc9f995c5.zip seabios-hppa-0da7bfdf21b2bbbfd74178f2943cd4efc9f995c5.tar.gz seabios-hppa-0da7bfdf21b2bbbfd74178f2943cd4efc9f995c5.tar.bz2 |
Build changes for Linux kconfig code to work in seabios dir structure.
-rw-r--r-- | Makefile | 17 | ||||
-rw-r--r-- | tools/kconfig/Makefile | 29 | ||||
-rw-r--r-- | tools/kconfig/POTFILES.in | 24 | ||||
-rw-r--r-- | tools/kconfig/gconf.c | 2 | ||||
-rw-r--r-- | tools/kconfig/kconfig_load.c | 2 |
5 files changed, 48 insertions, 26 deletions
@@ -54,13 +54,14 @@ ifdef V Q= else Q=@ +MAKEFLAGS += --no-print-directory endif OBJCOPY=objcopy OBJDUMP=objdump STRIP=strip -.PHONY : all FORCE +.PHONY : all clean distclean FORCE vpath %.c src vgasrc vpath %.S src vgasrc @@ -193,10 +194,24 @@ src/%.hex: src/%.dsl $(OUT)ccode32flat.o: src/acpi-dsdt.hex +####### Kconfig rules +export HOSTCC := $(CC) +export CONFIG_SHELL := sh +export KCONFIG_AUTOHEADER := autoconf.h +export KCONFIG_CONFIG := $(CURDIR)/.config + +%onfig: + $(Q)mkdir -p $(OUT)/tools/kconfig/lxdialog + $(Q)mkdir -p $(OUT)/include/config + $(Q)$(MAKE) -C $(OUT) -f $(CURDIR)/tools/kconfig/Makefile srctree=$(CURDIR) src=tools/kconfig obj=tools/kconfig Q=$(Q) Kconfig=$(CURDIR)/src/Kconfig $@ + ####### Generic rules clean: $(Q)rm -rf $(OUT) +distclean: clean + $(Q)rm -f .config .config.old + $(OUT): $(Q)mkdir $@ diff --git a/tools/kconfig/Makefile b/tools/kconfig/Makefile index 368ae30..890243b 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 9674573..f0baccd 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 4558961..b7f31f2 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 dbdcaad..2d0cff8 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); |