Makefile.in 1.3 KB

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