| 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 |
| 6 | obj = ./kconfig |
| 7 | PHONY += clean help oldconfig menuconfig config silentoldconfig \ |
| 8 | randconfig allyesconfig allnoconfig allmodconfig defconfig |
| 9 | |
| 10 | menuconfig: $(obj)/mconf |
| 11 | $< $(KCONFIG_TOP) |
| 12 | |
| 13 | config: $(obj)/conf |
| 14 | $< $(KCONFIG_TOP) |
| 15 | |
| 16 | oldconfig: $(obj)/conf |
| 17 | $< -o $(KCONFIG_TOP) |
| 18 | |
| 19 | silentoldconfig: $(obj)/conf |
| 20 | $< -s $(KCONFIG_TOP) |
| 21 | |
| 22 | randconfig: $(obj)/conf |
| 23 | $< -r $(KCONFIG_TOP) |
| 24 | |
| 25 | allyesconfig: $(obj)/conf |
| 26 | $< -y $(KCONFIG_TOP) |
| 27 | |
| 28 | allnoconfig: $(obj)/conf |
| 29 | $< -n $(KCONFIG_TOP) |
| 30 | |
| 31 | defconfig: $(obj)/conf |
| 32 | $< -d $(KCONFIG_TOP) |
| 33 | |
| 34 | # Help text used by make help |
| Rob Landley | cd2edfd | 2006-11-26 18:47:14 -0500 | [diff] [blame^] | 35 | help:: |
| landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 36 | @echo ' config - Update current config utilising a line-oriented program' |
| 37 | @echo ' menuconfig - Update current config utilising a menu based program' |
| 38 | @echo ' oldconfig - Update current config utilising a provided .config as base' |
| 39 | @echo ' silentoldconfig - Same as oldconfig, but quietly' |
| 40 | @echo ' randconfig - New config with random answer to all options' |
| 41 | @echo ' defconfig - New config with default answer to all options' |
| 42 | @echo ' allyesconfig - New config where all options are accepted with yes' |
| 43 | @echo ' allnoconfig - New config where all options are answered with no' |
| 44 | |
| 45 | # Cheesy build |
| 46 | |
| 47 | SHIPPED = kconfig/zconf.tab.c kconfig/lex.zconf.c kconfig/zconf.hash.c |
| 48 | |
| 49 | %.c: %.c_shipped |
| 50 | @ln -s $(notdir $<) $@ |
| 51 | |
| 52 | gen_config.h: .config |
| 53 | |
| 54 | kconfig/mconf: $(SHIPPED) |
| Rob Landley | 61a9cc5 | 2006-11-26 17:18:29 -0500 | [diff] [blame] | 55 | $(HOST_CC) -o $@ kconfig/{mconf.c,zconf.tab.c,lxdialog/*.c} \ |
| landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 56 | -lcurses "-DCURSES_LOC=<ncurses.h>" |
| 57 | |
| 58 | kconfig/conf: $(SHIPPED) |
| Rob Landley | 61a9cc5 | 2006-11-26 17:18:29 -0500 | [diff] [blame] | 59 | $(HOST_CC) -o $@ kconfig/{conf.c,zconf.tab.c} |
| landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 60 | |
| 61 | clean:: |
| 62 | rm -f $(wildcard kconfig/*zconf*.c) kconfig/{conf,mconf} |