blob: 46a8f6e401a6adcbc0cbd3b745724fb40c12e588 [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
6obj = ./kconfig
7PHONY += clean help oldconfig menuconfig config silentoldconfig \
8 randconfig allyesconfig allnoconfig allmodconfig defconfig
9
10menuconfig: $(obj)/mconf
11 $< $(KCONFIG_TOP)
12
13config: $(obj)/conf
14 $< $(KCONFIG_TOP)
15
16oldconfig: $(obj)/conf
17 $< -o $(KCONFIG_TOP)
18
19silentoldconfig: $(obj)/conf
20 $< -s $(KCONFIG_TOP)
21
22randconfig: $(obj)/conf
23 $< -r $(KCONFIG_TOP)
24
25allyesconfig: $(obj)/conf
26 $< -y $(KCONFIG_TOP)
27
28allnoconfig: $(obj)/conf
29 $< -n $(KCONFIG_TOP)
30
31defconfig: $(obj)/conf
32 $< -d $(KCONFIG_TOP)
33
34# Help text used by make help
Rob Landleycd2edfd2006-11-26 18:47:14 -050035help::
landley5257cf52006-10-31 23:30:06 -050036 @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
47SHIPPED = kconfig/zconf.tab.c kconfig/lex.zconf.c kconfig/zconf.hash.c
48
49%.c: %.c_shipped
50 @ln -s $(notdir $<) $@
51
52gen_config.h: .config
53
54kconfig/mconf: $(SHIPPED)
Rob Landley61a9cc52006-11-26 17:18:29 -050055 $(HOST_CC) -o $@ kconfig/{mconf.c,zconf.tab.c,lxdialog/*.c} \
landley5257cf52006-10-31 23:30:06 -050056 -lcurses "-DCURSES_LOC=<ncurses.h>"
57
58kconfig/conf: $(SHIPPED)
Rob Landley61a9cc52006-11-26 17:18:29 -050059 $(HOST_CC) -o $@ kconfig/{conf.c,zconf.tab.c}
landley5257cf52006-10-31 23:30:06 -050060
61clean::
62 rm -f $(wildcard kconfig/*zconf*.c) kconfig/{conf,mconf}