Makefile.in 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. CSRC := malloc.c calloc.c free.c realloc.c memalign.c \
  10. heap_alloc.c heap_alloc_at.c heap_free.c
  11. # Turn on malloc debugging if requested
  12. ifeq ($(UCLIBC_MALLOC_DEBUGGING),y)
  13. CSRC += malloc_debug.c heap_debug.c
  14. CFLAGS += -DMALLOC_DEBUGGING -DHEAP_DEBUGGING
  15. ifeq ($(UCLIBC_UCLINUX_BROKEN_MUNMAP),y)
  16. CFLAGS += -DMALLOC_MMB_DEBUGGING
  17. endif
  18. endif
  19. STDLIB_MALLOC_DIR := $(top_srcdir)libc/stdlib/malloc
  20. STDLIB_MALLOC_OUT := $(top_builddir)libc/stdlib/malloc
  21. STDLIB_MALLOC_SRC := $(patsubst %.c,$(STDLIB_MALLOC_DIR)/%.c,$(CSRC))
  22. STDLIB_MALLOC_OBJ := $(patsubst %.c,$(STDLIB_MALLOC_OUT)/%.o,$(CSRC))
  23. libc-$(MALLOC) += $(STDLIB_MALLOC_OBJ)
  24. objclean-y += stdlib_malloc_clean
  25. stdlib_malloc_clean:
  26. $(do_rm) $(addprefix $(STDLIB_MALLOC_OUT)/*., o os)
  27. malloc.o free.o realloc.o memalign.o: malloc.h
  28. # Depend on uClinux_config.h to cache changes in __UCLIBC_MALLOC_DEBUGGING__
  29. $(STDLIB_MALLOC_OBJ): $(STDLIB_MALLOC_DIR)/heap.h $(top_builddir)include/bits/uClibc_config.h