# Makefile for uClibc
#
# Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
#
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#

subdirs += libc/stdlib/malloc-standard

STDLIB_MALLOC_STANDARD_DIR := $(top_srcdir)libc/stdlib/malloc-standard
STDLIB_MALLOC_STANDARD_OUT := $(top_builddir)libc/stdlib/malloc-standard

CSRC-y := $(notdir $(wildcard $(STDLIB_MALLOC_STANDARD_DIR)/*.c))

STDLIB_MALLOC_STANDARD_SRC := $(patsubst %.c,$(STDLIB_MALLOC_STANDARD_DIR)/%.c,$(CSRC-y))
STDLIB_MALLOC_STANDARD_OBJ := $(patsubst %.c,$(STDLIB_MALLOC_STANDARD_OUT)/%.o,$(CSRC-y))

libc-$(MALLOC_STANDARD) += $(STDLIB_MALLOC_STANDARD_OBJ)

objclean-y += CLEAN_libc/stdlib/malloc-standard

CLEAN_libc/stdlib/malloc-standard:
	$(do_rm) $(addprefix $(STDLIB_MALLOC_STANDARD_OUT)/*., o os)