Makefile.in 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Makefile for uClibc
  2. #
  3. # Copyright (C) 2002-2003 NEC Electronics Corporation
  4. # Copyright (C) 2002-2003 Miles Bader <miles@gnu.org>
  5. # Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
  6. #
  7. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  8. #
  9. subdirs += libc/stdlib/malloc
  10. CSRC := malloc.c calloc.c free.c realloc.c memalign.c \
  11. heap_alloc.c heap_alloc_at.c heap_free.c
  12. # Turn on malloc debugging if requested
  13. ifeq ($(UCLIBC_MALLOC_DEBUGGING),y)
  14. CSRC += malloc_debug.c heap_debug.c
  15. CFLAGS += -DMALLOC_DEBUGGING -DHEAP_DEBUGGING
  16. ifeq ($(UCLIBC_UCLINUX_BROKEN_MUNMAP),y)
  17. CFLAGS += -DMALLOC_MMB_DEBUGGING
  18. endif
  19. endif
  20. STDLIB_MALLOC_DIR := $(top_srcdir)libc/stdlib/malloc
  21. STDLIB_MALLOC_OUT := $(top_builddir)libc/stdlib/malloc
  22. STDLIB_MALLOC_SRC := $(patsubst %.c,$(STDLIB_MALLOC_DIR)/%.c,$(CSRC))
  23. STDLIB_MALLOC_OBJ := $(patsubst %.c,$(STDLIB_MALLOC_OUT)/%.o,$(CSRC))
  24. libc-$(MALLOC) += $(STDLIB_MALLOC_OBJ)
  25. objclean-y += CLEAN_libc/stdlib/malloc
  26. CLEAN_libc/stdlib/malloc:
  27. $(do_rm) $(addprefix $(STDLIB_MALLOC_OUT)/*., o os)
  28. malloc.o free.o realloc.o memalign.o: malloc.h
  29. # Depend on uClinux_config.h to cache changes in __UCLIBC_MALLOC_DEBUGGING__
  30. $(STDLIB_MALLOC_OBJ): $(STDLIB_MALLOC_DIR)/heap.h $(top_builddir)include/bits/uClibc_config.h