Makefile.in 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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-2005 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-a-$(MALLOC)+=$(STDLIB_MALLOC_OBJ)
  24. libc-so-$(MALLOC)+=$(STDLIB_MALLOC_OBJ:.o=.os)
  25. libc-multi-$(MALLOC)+=$(STDLIB_MALLOC_SRC)
  26. objclean-y+=stdlib_malloc_objclean
  27. stdlib_malloc_objclean:
  28. $(RM) $(STDLIB_MALLOC_OUT)/*.{o,os}
  29. malloc.o free.o realloc.o memalign.o: malloc.h
  30. # Depend on uClinux_config.h to cache changes in __UCLIBC_MALLOC_DEBUGGING__
  31. $(STDLIB_MALLOC_OBJ): $(STDLIB_MALLOC_DIR)/heap.h $(top_builddir)include/bits/uClibc_config.h