kconfig/Makefile
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu May 17 22:10:48 2007 +0000 (2007-05-17)
changeset 97 63a30dd47eb8
parent 88 f67b52e42fd1
child 148 567f1673d59d
permissions -rw-r--r--
Make the debug config menu a generated file.
Add a uClibc-0.9.29 patch directory with one patch (from me!).
Update the armeb-unknown-linux-uclibc sample to uClibc-0.9.29.
Some eyecandy in the gdb build process.
     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 # Darwin (MacOS-X) does not have proper libintl support
    11 ifeq ($(shell uname -s),Darwin)
    12 KBUILD_NO_NLS:=1
    13 endif
    14 
    15 ifneq ($(KBUILD_NO_NLS),)
    16 CFLAGS += -DKBUILD_NO_NLS
    17 endif
    18 
    19 # Build a list of all config files
    20 CONFIG_FILES = $(filter-out %debug.in,$(shell find $(CT_TOP_DIR)/config -type f -name '*.in'))
    21 
    22 # Derive the project version from, well, the project version:
    23 export PROJECTVERSION=$(CT_VERSION)
    24 
    25 $(CT_TOP_DIR)/config/debug.in: $(CONFIG_FILES)
    26 	@echo "# Debug facilities menu" >$@
    27 	@echo "# Generated file, do not edit!!!" >>$@
    28 	@echo "menu \"Debug facilities\"" >>$@
    29 	@for f in $(patsubst $(CT_TOP_DIR)/%,%,$(wildcard $(CT_TOP_DIR)/config/debug/*.in)); do \
    30 	     echo "source $${f}";                                                               \
    31 	 done >>$@
    32 	@echo "endmenu" >>$@
    33 
    34 menuconfig: $(obj)/mconf $(CT_TOP_DIR)/config/debug.in
    35 	@$< $(KCONFIG_TOP)
    36 
    37 config: $(obj)/conf $(CT_TOP_DIR)/config/debug.in
    38 	@$< $(KCONFIG_TOP)
    39 
    40 oldconfig: $(obj)/conf $(CT_TOP_DIR)/config/debug.in
    41 	@$< -s $(KCONFIG_TOP)
    42 
    43 # Help text used by make help
    44 help::
    45 	@echo  'General purpose configuration targets:'
    46 	@echo  '  config         - Update current config using a line-oriented program'
    47 	@echo  '  menuconfig     - Update current config using a menu based program'
    48 	@echo  '  oldconfig      - Update current config using a provided .config as base'
    49 	@# saveconfig is listed here for homogeneity, but implemented in samples/Makefile
    50 	@echo  '  saveconfig     - Save current config as a preconfigured target'
    51 	@echo  ''
    52 
    53 # Cheesy build
    54 
    55 SHIPPED = kconfig/zconf.tab.c kconfig/lex.zconf.c kconfig/zconf.hash.c
    56 
    57 %.c: %.c_shipped
    58 	@ln -s $(notdir $<) $@
    59 
    60 kconfig/mconf: $(SHIPPED) kconfig/mconf.c
    61 	@$(HOST_CC) $(CFLAGS) -o $@ kconfig/{mconf.c,zconf.tab.c,lxdialog/*.c} \
    62 		-lcurses "-DCURSES_LOC=<ncurses.h>"
    63 
    64 kconfig/conf: $(SHIPPED) kconfig/conf.c
    65 	@$(HOST_CC) $(CFLAGS) -o $@ kconfig/{conf.c,zconf.tab.c}
    66 
    67 clean::
    68 	@rm -f $(wildcard kconfig/*zconf*.c) kconfig/{conf,mconf}
    69 	@rm -f "$(CT_TOP_DIR)/config/debug.in"