Makefile.in 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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-libpthread/nptl_db := -DNOT_IN_libc \
  10. -DLIBPTHREAD_SO="\"libpthread.so.$(ABI_VERSION)\"" \
  11. -std=gnu99 -D_GNU_SOURCE \
  12. -I$(top_srcdir)libpthread/nptl \
  13. -I$(top_srcdir)ldso/include
  14. LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) $(if $(call check_ld,--warn-unresolved-symbols),-Wl$(comma)--warn-unresolved-symbols)
  15. LIBS-libthread_db.so := $(LIBS)
  16. libthread_db_FULL_NAME := libthread_db-$(VERSION).so
  17. libthread_db_DIR := $(top_srcdir)libpthread/nptl_db
  18. libthread_db_OUT := $(top_builddir)libpthread/nptl_db
  19. libthread_db_SRC := $(notdir $(wildcard $(libthread_db_DIR)/td_*.c) \
  20. $(libthread_db_DIR)/fetch-value.c)
  21. ifeq ($(UCLIBC_SUSV4_LEGACY),)
  22. libthread_db_SRC := $(filter-out td_ta_setconcurrency.c,$(libthread_db_SRC))
  23. endif
  24. libthread_db_OBJ := $(addprefix $(libthread_db_OUT)/,$(libthread_db_SRC:.c=.o))
  25. libthread_db-so-y := $(libthread_db_OBJ:.o=.oS)
  26. ifeq ($(DOPIC),y)
  27. libthread_db-a-y := $(libthread_db-so-y)
  28. else
  29. libthread_db-a-y := $(libthread_db_OBJ)
  30. endif
  31. libthread_db-multi-y := $(addprefix $(libthread_db_DIR)/,$(libthread_db_SRC))
  32. lib-a-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.a
  33. lib-so-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.so
  34. objclean-y += CLEAN_libpthread/nptl_db
  35. headers-$(PTHREADS_DEBUG_SUPPORT) += $(nptl_db_headers)
  36. headers_clean-y += HEADERCLEAN_libpthread/nptl_db
  37. ifeq ($(DOPIC),y)
  38. $(top_builddir)lib/libthread_db.so: $(top_builddir)lib/libthread_db.a $(libc.depend)
  39. else
  40. $(top_builddir)lib/libthread_db.so: $(libthread_db_OUT)/libthread_db_so.a $(libc.depend)
  41. endif
  42. $(call link.so,$(libthread_db_FULL_NAME),1)
  43. $(libthread_db_OUT)/libthread_db_so.a: $(libthread_db-so-y)
  44. $(Q)$(RM) $@
  45. $(do_strip)
  46. $(do_ar)
  47. $(top_builddir)lib/libthread_db.a: $(libthread_db-a-y) | $(top_builddir)lib
  48. $(Q)$(RM) $@
  49. $(do_strip)
  50. $(do_ar)
  51. $(top_builddir)include/thread_db.h:
  52. $(do_ln) $(call rel_srcdir)$(PTDIR)_db/$(@F) $@
  53. nptl_db_headers:= $(top_builddir)include/thread_db.h
  54. HEADERCLEAN_libpthread/nptl_db:
  55. $(do_rm) $(nptl_db_headers)
  56. CLEAN_libpthread/nptl_db:
  57. $(do_rm) $(addprefix $(libthread_db_OUT)/*., o oS a)