kconfig/Makefile
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 19:17:40 2007 +0000 (2007-02-24)
changeset 2 687f86f2a01c
parent 1 eeea35fbf182
child 11 1e91bf61f215
permissions -rw-r--r--
Remove useless config targets.
     1 # ===========================================================================
     2 # crosstool-ng configuration targets
     3 # These targets are used from top-level makefile
     4 
     5 KCONFIG_TOP = config/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 	@$< -s $(KCONFIG_TOP)
    18 
    19 # Build a list of all available samples
    20 SAMPLES = $(patsubst $(CT_TOP_DIR)/samples/%,%,$(filter-out %Makefile,$(wildcard $(CT_TOP_DIR)/samples/*)))
    21 SAMPLES_CONFIG = $(patsubst %,%_config,$(SAMPLES))
    22 .PHONY: $(SAMPLES_CONFIG)
    23 $(SAMPLES_CONFIG):
    24 	@cp "$(CT_TOP_DIR)/samples/$(patsubst %_config,%,$@)/crosstool.config" "$(CT_TOP_DIR)/.config"
    25 	@$(MAKE) oldconfig
    26 
    27 # Help text used by make help
    28 help::
    29 	@echo  'General purpose configuration targets:'
    30 	@echo  '  config	  - Update current config utilising a line-oriented program'
    31 	@echo  '  menuconfig	  - Update current config utilising a menu based program'
    32 	@echo  '  oldconfig	  - Update current config utilising a provided .config as base'
    33 	@echo
    34 	@echo  'Preconfigured configuration targets:'
    35 	@for s in $(SAMPLES_CONFIG); do   \
    36 	    echo  "  $${s}"; \
    37 	 done
    38 	@echo  ''
    39 
    40 # Cheesy build
    41 
    42 SHIPPED = kconfig/zconf.tab.c kconfig/lex.zconf.c kconfig/zconf.hash.c
    43 
    44 %.c: %.c_shipped
    45 	@ln -s $(notdir $<) $@
    46 
    47 kconfig/mconf: $(SHIPPED) kconfig/mconf.c
    48 	@$(HOST_CC) -o $@ kconfig/{mconf.c,zconf.tab.c,lxdialog/*.c} \
    49 		-lcurses "-DCURSES_LOC=<ncurses.h>"
    50 
    51 kconfig/conf: $(SHIPPED) kconfig/conf.c
    52 	@$(HOST_CC) -o $@ kconfig/{conf.c,zconf.tab.c}
    53 
    54 clean::
    55 	@rm -f $(wildcard kconfig/*zconf*.c) kconfig/{conf,mconf}