Makefile.in 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Makefile for uClibc
  2. #
  3. # Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
  4. #
  5. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  6. #
  7. subdirs += libpthread/nptl_db
  8. # Get the thread include dependencies and shared object name
  9. CFLAGS-nptl_db := -DLIBPTHREAD_SO="\"libpthread.so.$(ABI_VERSION)\""
  10. CFLAGS-nptl_db += -I$(top_srcdir)libpthread/nptl -D_GNU_SOURCE
  11. CFLAGS-nptl_db += -DIS_IN_libthread_db=1 -DNOT_IN_libc -std=gnu99 -I$(top_srcdir)ldso/include
  12. LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) $(if $(call check_ld,--warn-unresolved-symbols),-Wl$(comma)--warn-unresolved-symbols)
  13. LIBS-libthread_db.so := $(LIBS)
  14. libthread_db_FULL_NAME := libthread_db-$(VERSION).so
  15. libthread_db_DIR := $(top_srcdir)libpthread/nptl_db
  16. libthread_db_OUT := $(top_builddir)libpthread/nptl_db
  17. libthread_db_SRC := $(wildcard $(libthread_db_DIR)/td_*.c) \
  18. $(libthread_db_DIR)/fetch-value.c
  19. libthread_db_OBJ := $(patsubst $(libthread_db_DIR)/%.c,$(libthread_db_OUT)/%.o,$(libthread_db_SRC))
  20. libthread_db-so-y := $(libthread_db_OBJ:.o=.oS)
  21. ifeq ($(DOPIC),y)
  22. libthread_db-a-y := $(libthread_db-so-y)
  23. else
  24. libthread_db-a-y := $(libthread_db_OBJ)
  25. endif
  26. libthread_db-multi-y := $(libthread_db_SRC)
  27. lib-a-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.a
  28. lib-so-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.so
  29. objclean-y += CLEAN_libpthread/nptl_db
  30. headers-$(PTHREADS_DEBUG_SUPPORT) += $(nptl_db_headers)
  31. headers_clean-y += HEADERCLEAN_libpthread/nptl_db
  32. ifeq ($(DOPIC),y)
  33. $(top_builddir)lib/libthread_db.so: $(top_builddir)lib/libthread_db.a $(libc.depend)
  34. else
  35. $(top_builddir)lib/libthread_db.so: $(libthread_db_OUT)/libthread_db_so.a $(libc.depend)
  36. endif
  37. $(call link.so,$(libthread_db_FULL_NAME),1)
  38. $(libthread_db_OUT)/libthread_db_so.a: $(libthread_db-so-y)
  39. $(Q)$(RM) $@
  40. $(do_strip)
  41. $(do_ar)
  42. $(top_builddir)lib/libthread_db.a: $(libthread_db-a-y) | $(top_builddir)lib
  43. $(Q)$(RM) $@
  44. $(do_strip)
  45. $(do_ar)
  46. $(top_builddir)include/thread_db.h:
  47. $(do_ln) $(call rel_srcdir)$(PTDIR)_db/$(@F) $@
  48. nptl_db_headers:= $(top_builddir)include/thread_db.h
  49. HEADERCLEAN_libpthread/nptl_db:
  50. $(do_rm) $(nptl_db_headers)
  51. CLEAN_libpthread/nptl_db:
  52. $(do_rm) $(addprefix $(libthread_db_OUT)/*., o oS a)