landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 1 | # =========================================================================== |
| 2 | # Kernel configuration targets |
| 3 | # These targets are used from top-level makefile |
| 4 | |
| 5 | KCONFIG_TOP = Config.in |
Rob Landley | 217047b | 2007-03-12 22:54:02 -0400 | [diff] [blame] | 6 | KCONFIG_PROJECT = ToyBox |
landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 7 | obj = ./kconfig |
| 8 | PHONY += clean help oldconfig menuconfig config silentoldconfig \ |
Rob Landley | e35f2b8 | 2007-06-18 01:09:00 -0400 | [diff] [blame] | 9 | randconfig allyesconfig allnoconfig allmodconfig defconfig |
landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 10 | |
Rob Landley | 2896480 | 2008-01-19 17:08:39 -0600 | [diff] [blame] | 11 | menuconfig: $(obj)/mconf $(KCONFIG_TOP) |
landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 12 | $< $(KCONFIG_TOP) |
| 13 | |
Rob Landley | 2896480 | 2008-01-19 17:08:39 -0600 | [diff] [blame] | 14 | config: $(obj)/conf $(KCONFIG_TOP) |
landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 15 | $< $(KCONFIG_TOP) |
| 16 | |
Rob Landley | 2896480 | 2008-01-19 17:08:39 -0600 | [diff] [blame] | 17 | oldconfig: $(obj)/conf $(KCONFIG_TOP) |
landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 18 | $< -o $(KCONFIG_TOP) |
| 19 | |
Rob Landley | 2896480 | 2008-01-19 17:08:39 -0600 | [diff] [blame] | 20 | silentoldconfig: $(obj)/conf $(KCONFIG_TOP) |
landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 21 | $< -s $(KCONFIG_TOP) |
| 22 | |
Rob Landley | 2896480 | 2008-01-19 17:08:39 -0600 | [diff] [blame] | 23 | randconfig: $(obj)/conf $(KCONFIG_TOP) |
landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 24 | $< -r $(KCONFIG_TOP) |
| 25 | |
Rob Landley | 2896480 | 2008-01-19 17:08:39 -0600 | [diff] [blame] | 26 | allyesconfig: $(obj)/conf $(KCONFIG_TOP) |
landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 27 | $< -y $(KCONFIG_TOP) |
| 28 | |
Rob Landley | 2896480 | 2008-01-19 17:08:39 -0600 | [diff] [blame] | 29 | allnoconfig: $(obj)/conf $(KCONFIG_TOP) |
landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 30 | $< -n $(KCONFIG_TOP) |
| 31 | |
Rob Landley | 2896480 | 2008-01-19 17:08:39 -0600 | [diff] [blame] | 32 | defconfig: $(obj)/conf $(KCONFIG_TOP) |
Rob Landley | e35f2b8 | 2007-06-18 01:09:00 -0400 | [diff] [blame] | 33 | $< -D /dev/null $(KCONFIG_TOP) |
landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 34 | |
| 35 | # Help text used by make help |
Rob Landley | cd2edfd | 2006-11-26 18:47:14 -0500 | [diff] [blame] | 36 | help:: |
landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 37 | @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 | |
| 48 | SHIPPED = kconfig/zconf.tab.c kconfig/lex.zconf.c kconfig/zconf.hash.c |
| 49 | |
| 50 | %.c: %.c_shipped |
| 51 | @ln -s $(notdir $<) $@ |
| 52 | |
| 53 | gen_config.h: .config |
| 54 | |
| 55 | kconfig/mconf: $(SHIPPED) |
Rob Landley | 217047b | 2007-03-12 22:54:02 -0400 | [diff] [blame] | 56 | $(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)\" |
landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 59 | |
| 60 | kconfig/conf: $(SHIPPED) |
Rob Landley | 9fdf465 | 2007-06-01 11:46:56 -0400 | [diff] [blame] | 61 | $(HOSTCC) -o $@ kconfig/conf.c kconfig/zconf.tab.c -DKBUILD_NO_NLS=1 \ |
Rob Landley | 217047b | 2007-03-12 22:54:02 -0400 | [diff] [blame] | 62 | -DPROJECT_NAME=\"$(KCONFIG_PROJECT)\" |
landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 63 | |
| 64 | clean:: |
Rob Landley | 9fdf465 | 2007-06-01 11:46:56 -0400 | [diff] [blame] | 65 | rm -f $(wildcard kconfig/*zconf*.c) kconfig/conf kconfig/mconf |