# Makefile for uClibc
#
# Copyright (C) 2002-2003 NEC Electronics Corporation
# Copyright (C) 2002-2003 Miles Bader <miles@gnu.org>
# Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
#
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#

klib-$(MALLOC) += \
    malloc.c calloc.c free.c realloc.c memalign.c \
    heap_alloc.c heap_alloc_at.c heap_free.c

# Turn on malloc debugging if requested
ifeq ($(UCLIBC_MALLOC_DEBUGGING),y)
klib-$(MALLOC) += malloc_debug.c heap_debug.c
EXTRA_CFLAGS += -DMALLOC_DEBUGGING -DHEAP_DEBUGGING
ifeq ($(UCLIBC_UCLINUX_BROKEN_MUNMAP),y)
EXTRA_CFLAGS += -DMALLOC_MMB_DEBUGGING
endif
endif
