Add dmalloc debug library facility.
Add patches for dmalloc.
Ignore the generated config/debug.in
1 # ===========================================================================
2 # crosstool-ng configuration targets
3 # These targets are used from top-level makefile
5 KCONFIG_TOP = config/config.in
7 PHONY += clean help oldconfig menuconfig config silentoldconfig \
8 randconfig allyesconfig allnoconfig allmodconfig defconfig
10 # Darwin (MacOS-X) does not have proper libintl support
11 ifeq ($(shell uname -s),Darwin)
15 ifneq ($(KBUILD_NO_NLS),)
16 CFLAGS += -DKBUILD_NO_NLS
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'))
22 # Derive the project version from, well, the project version:
23 export PROJECTVERSION=$(CT_VERSION)
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}"; \
34 menuconfig: $(obj)/mconf $(CT_TOP_DIR)/config/debug.in
37 config: $(obj)/conf $(CT_TOP_DIR)/config/debug.in
40 oldconfig: $(obj)/conf $(CT_TOP_DIR)/config/debug.in
43 # Help text used by make 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'
55 SHIPPED = kconfig/zconf.tab.c kconfig/lex.zconf.c kconfig/zconf.hash.c
58 @ln -s $(notdir $<) $@
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>"
64 kconfig/conf: $(SHIPPED) kconfig/conf.c
65 @$(HOST_CC) $(CFLAGS) -o $@ kconfig/{conf.c,zconf.tab.c}
68 @rm -f $(wildcard kconfig/*zconf*.c) kconfig/{conf,mconf}
69 @rm -f "$(CT_TOP_DIR)/config/debug.in"