Makefile.in 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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/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) -s --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)
  34. else
  35. $(top_builddir)lib/libthread_db.so: $(libthread_db_OUT)/libthread_db_so.a $(libc)
  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)
  43. $(Q)$(INSTALL) -d $(dir $@)
  44. $(Q)$(RM) $@
  45. $(do_strip)
  46. $(do_ar)
  47. $(top_builddir)include/thread_db.h:
  48. $(do_ln) $(call rel_srcdir)$(PTDIR)_db/$(@F) $@
  49. nptl_db_headers:= $(top_builddir)include/thread_db.h
  50. HEADERCLEAN_libpthread/nptl_db:
  51. $(do_rm) $(nptl_db_headers)
  52. CLEAN_libpthread/nptl_db:
  53. $(do_rm) $(addprefix $(libthread_db_OUT)/*., o oS a)