blob: 7eaee9555517b901e639553505aff16b6e93b2ab [file] [log] [blame]
landley5257cf52006-10-31 23:30:06 -05001# ===========================================================================
2# Kernel configuration targets
3# These targets are used from top-level makefile
4
5KCONFIG_TOP = Config.in
Rob Landley217047b2007-03-12 22:54:02 -04006KCONFIG_PROJECT = ToyBox
landley5257cf52006-10-31 23:30:06 -05007obj = ./kconfig
8PHONY += clean help oldconfig menuconfig config silentoldconfig \
Rob Landleye35f2b82007-06-18 01:09:00 -04009 randconfig allyesconfig allnoconfig allmodconfig defconfig
landley5257cf52006-10-31 23:30:06 -050010
Rob Landley28964802008-01-19 17:08:39 -060011menuconfig: $(obj)/mconf $(KCONFIG_TOP)
landley5257cf52006-10-31 23:30:06 -050012 $< $(KCONFIG_TOP)
13
Rob Landley28964802008-01-19 17:08:39 -060014config: $(obj)/conf $(KCONFIG_TOP)
landley5257cf52006-10-31 23:30:06 -050015 $< $(KCONFIG_TOP)
16
Rob Landley28964802008-01-19 17:08:39 -060017oldconfig: $(obj)/conf $(KCONFIG_TOP)
landley5257cf52006-10-31 23:30:06 -050018 $< -o $(KCONFIG_TOP)
19
Rob Landley28964802008-01-19 17:08:39 -060020silentoldconfig: $(obj)/conf $(KCONFIG_TOP)
landley5257cf52006-10-31 23:30:06 -050021 $< -s $(KCONFIG_TOP)
22
Rob Landley28964802008-01-19 17:08:39 -060023randconfig: $(obj)/conf $(KCONFIG_TOP)
landley5257cf52006-10-31 23:30:06 -050024 $< -r $(KCONFIG_TOP)
25
Rob Landley28964802008-01-19 17:08:39 -060026allyesconfig: $(obj)/conf $(KCONFIG_TOP)
landley5257cf52006-10-31 23:30:06 -050027 $< -y $(KCONFIG_TOP)
28
Rob Landley28964802008-01-19 17:08:39 -060029allnoconfig: $(obj)/conf $(KCONFIG_TOP)
landley5257cf52006-10-31 23:30:06 -050030 $< -n $(KCONFIG_TOP)
31
Rob Landley28964802008-01-19 17:08:39 -060032defconfig: $(obj)/conf $(KCONFIG_TOP)
Rob Landleye35f2b82007-06-18 01:09:00 -040033 $< -D /dev/null $(KCONFIG_TOP)
landley5257cf52006-10-31 23:30:06 -050034
35# Help text used by make help
Rob Landleycd2edfd2006-11-26 18:47:14 -050036help::
landley5257cf52006-10-31 23:30:06 -050037 @echo ' config - Update current config utilising a line-oriented program'
38 @echo ' menuconfig - Update current config utilising a menu based program'
39 @echo ' oldconfig - Update current config utilising a provided .config as base'
40 @echo ' silentoldconfig - Same as oldconfig, but quietly'
41 @echo ' randconfig - New config with random answer to all options'
42 @echo ' defconfig - New config with default answer to all options'
43 @echo ' allyesconfig - New config where all options are accepted with yes'
44 @echo ' allnoconfig - New config where all options are answered with no'
45
46# Cheesy build
47
48SHIPPED = kconfig/zconf.tab.c kconfig/lex.zconf.c kconfig/zconf.hash.c
49
50%.c: %.c_shipped
51 @ln -s $(notdir $<) $@
52
53gen_config.h: .config
54
55kconfig/mconf: $(SHIPPED)
Rob Landley217047b2007-03-12 22:54:02 -040056 $(HOSTCC) -o $@ kconfig/mconf.c kconfig/zconf.tab.c \
57 kconfig/lxdialog/*.c -lcurses -DCURSES_LOC="<ncurses.h>" \
58 -DKBUILD_NO_NLS=1 -DPROJECT_NAME=\"$(KCONFIG_PROJECT)\"
landley5257cf52006-10-31 23:30:06 -050059
60kconfig/conf: $(SHIPPED)
Rob Landley9fdf4652007-06-01 11:46:56 -040061 $(HOSTCC) -o $@ kconfig/conf.c kconfig/zconf.tab.c -DKBUILD_NO_NLS=1 \
Rob Landley217047b2007-03-12 22:54:02 -040062 -DPROJECT_NAME=\"$(KCONFIG_PROJECT)\"
landley5257cf52006-10-31 23:30:06 -050063
64clean::
Rob Landley9fdf4652007-06-01 11:46:56 -040065 rm -f $(wildcard kconfig/*zconf*.c) kconfig/conf kconfig/mconf