kconfig/Makefile
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun May 13 19:03:49 2007 +0000 (2007-05-13)
changeset 88 f67b52e42fd1
parent 63 89b41dbffe8d
child 97 63a30dd47eb8
permissions -rw-r--r--
Correctly handle the version string, defined in a single place now.
Fix and update README.
     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 # Derive the project version from, well, the project version:
    20 export PROJECTVERSION=$(CT_VERSION)
    21 
    22 menuconfig: $(obj)/mconf
    23 	@$< $(KCONFIG_TOP)
    24 
    25 config: $(obj)/conf
    26 	@$< $(KCONFIG_TOP)
    27 
    28 oldconfig: $(obj)/conf
    29 	@$< -s $(KCONFIG_TOP)
    30 
    31 # Help text used by make help
    32 help::
    33 	@echo  'General purpose configuration targets:'
    34 	@echo  '  config         - Update current config using a line-oriented program'
    35 	@echo  '  menuconfig     - Update current config using a menu based program'
    36 	@echo  '  oldconfig      - Update current config using a provided .config as base'
    37 	@# saveconfig is listed here for homogeneity, but implemented in samples/Makefile
    38 	@echo  '  saveconfig     - Save current config as a preconfigured target'
    39 	@echo  ''
    40 
    41 # Cheesy build
    42 
    43 SHIPPED = kconfig/zconf.tab.c kconfig/lex.zconf.c kconfig/zconf.hash.c
    44 
    45 %.c: %.c_shipped
    46 	@ln -s $(notdir $<) $@
    47 
    48 kconfig/mconf: $(SHIPPED) kconfig/mconf.c
    49 	@$(HOST_CC) $(CFLAGS) -o $@ kconfig/{mconf.c,zconf.tab.c,lxdialog/*.c} \
    50 		-lcurses "-DCURSES_LOC=<ncurses.h>"
    51 
    52 kconfig/conf: $(SHIPPED) kconfig/conf.c
    53 	@$(HOST_CC) $(CFLAGS) -o $@ kconfig/{conf.c,zconf.tab.c}
    54 
    55 clean::
    56 	@rm -f $(wildcard kconfig/*zconf*.c) kconfig/{conf,mconf}