blob: 7da7fe1dfa7462e4699a23ba0057f6a1a3183bf3 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001# Makefile for uClibc
2#
3# Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
4#
5# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
6#
7
8subdirs += libc/stdlib/malloc-standard
9
10# calloc.c can be found at uClibc/libc/stdlib/calloc.c
11# valloc.c can be found at uClibc/libc/stdlib/valloc.c
12CSRC := malloc.c calloc.c realloc.c free.c memalign.c mallopt.c mallinfo.c
13
14STDLIB_MALLOC_STANDARD_DIR := $(top_srcdir)libc/stdlib/malloc-standard
15STDLIB_MALLOC_STANDARD_OUT := $(top_builddir)libc/stdlib/malloc-standard
16
17STDLIB_MALLOC_STANDARD_SRC := $(patsubst %.c,$(STDLIB_MALLOC_STANDARD_DIR)/%.c,$(CSRC))
18STDLIB_MALLOC_STANDARD_OBJ := $(patsubst %.c,$(STDLIB_MALLOC_STANDARD_OUT)/%.o,$(CSRC))
19
20libc-$(MALLOC_STANDARD) += $(STDLIB_MALLOC_STANDARD_OBJ)
21
22objclean-y += CLEAN_libc/stdlib/malloc-standard
23
24CLEAN_libc/stdlib/malloc-standard:
25 $(do_rm) $(addprefix $(STDLIB_MALLOC_STANDARD_OUT)/*., o os)