Makefile.in 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. ifeq ($(UCLIBC_SUSV4_LEGACY),)
  20. libthread_db_SRC := $(filter-out td_ta_setconcurrency.c,$(libthread_db_SRC))
  21. endif
  22. libthread_db_OBJ := $(patsubst $(libthread_db_DIR)/%.c,$(libthread_db_OUT)/%.o,$(libthread_db_SRC))
  23. libthread_db-so-y := $(libthread_db_OBJ:.o=.oS)
  24. ifeq ($(DOPIC),y)
  25. libthread_db-a-y := $(libthread_db-so-y)
  26. else
  27. libthread_db-a-y := $(libthread_db_OBJ)
  28. endif
  29. libthread_db-multi-y := $(libthread_db_SRC)
  30. lib-a-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.a
  31. lib-so-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.so
  32. objclean-y += CLEAN_libpthread/nptl_db
  33. headers-$(PTHREADS_DEBUG_SUPPORT) += $(nptl_db_headers)
  34. headers_clean-y += HEADERCLEAN_libpthread/nptl_db
  35. ifeq ($(DOPIC),y)
  36. $(top_builddir)lib/libthread_db.so: $(top_builddir)lib/libthread_db.a $(libc.depend)
  37. else
  38. $(top_builddir)lib/libthread_db.so: $(libthread_db_OUT)/libthread_db_so.a $(libc.depend)
  39. endif
  40. $(call link.so,$(libthread_db_FULL_NAME),1)
  41. $(libthread_db_OUT)/libthread_db_so.a: $(libthread_db-so-y)
  42. $(Q)$(RM) $@
  43. $(do_strip)
  44. $(do_ar)
  45. $(top_builddir)lib/libthread_db.a: $(libthread_db-a-y) | $(top_builddir)lib
  46. $(Q)$(RM) $@
  47. $(do_strip)
  48. $(do_ar)
  49. $(top_builddir)include/thread_db.h:
  50. $(do_ln) $(call rel_srcdir)$(PTDIR)_db/$(@F) $@
  51. nptl_db_headers:= $(top_builddir)include/thread_db.h
  52. HEADERCLEAN_libpthread/nptl_db:
  53. $(do_rm) $(nptl_db_headers)
  54. CLEAN_libpthread/nptl_db:
  55. $(do_rm) $(addprefix $(libthread_db_OUT)/*., o oS a)