Makefile.in 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # Makefile for uClibc
  2. #
  3. # Copyright (C) 2000-2008 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/linuxthreads.old_db
  8. # Get the thread include dependencies and shared object name
  9. CFLAGS-linuxthreads.old_db := -DNOT_IN_libc -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
  10. LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) $(if $(call check_ld,--warn-unresolved-symbols),-Wl$(comma)--warn-unresolved-symbols)
  11. ifeq ($(DOSTRIP),y)
  12. LDFLAGS-libthread_db.so += -Wl,-s
  13. endif
  14. LIBS-libthread_db.so := $(LIBS)
  15. libthread_db_FULL_NAME := libthread_db-$(VERSION).so
  16. libthread_db_DIR := $(top_srcdir)libpthread/linuxthreads.old_db
  17. libthread_db_OUT := $(top_builddir)libpthread/linuxthreads.old_db
  18. libthread_db_SRC := $(wildcard $(libthread_db_DIR)/*.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. lib-a-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.a
  27. lib-so-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.so
  28. #ifeq ($(DOMULTI),n)
  29. ifeq ($(DOPIC),y)
  30. $(top_builddir)lib/libthread_db.so: $(top_builddir)lib/libthread_db.a $(libc.depend)
  31. else
  32. $(top_builddir)lib/libthread_db.so: $(libthread_db_OUT)/libthread_db_so.a $(libc.depend)
  33. endif
  34. $(call link.so,$(libthread_db_FULL_NAME),1)
  35. #else
  36. #$(top_builddir)lib/libthread_db.so: $(libthread_db_OUT)/libthread_db.oS | $(libc.depend)
  37. # $(call linkm.so,$(libthread_db_FULL_NAME),1)
  38. #endif
  39. $(libthread_db_OUT)/libthread_db_so.a: $(libthread_db-so-y)
  40. $(Q)$(RM) $@
  41. $(do_ar)
  42. $(libthread_db_OUT)/libthread_db.oS: $(libthread_db_SRC)
  43. $(Q)$(RM) $@
  44. $(compile-m)
  45. $(top_builddir)lib/libthread_db.a: $(libthread_db-a-y)
  46. $(Q)$(INSTALL) -d $(dir $@)
  47. $(Q)$(RM) $@
  48. $(do_ar)
  49. $(top_builddir)include/thread_db.h:
  50. $(do_ln) $(call rel_srcdir)$(PTDIR)_db/$(@F) $@
  51. linuxthreads_db_headers := $(top_builddir)include/thread_db.h
  52. $(linuxthreads_db_headers): $(wildcard $(addprefix $(top_builddir)include/config/linuxthreads/,old.h new.h))
  53. headers-$(PTHREADS_DEBUG_SUPPORT) += $(linuxthreads_db_headers)
  54. objclean-y += CLEAN_libpthread/linuxthreads.old_db
  55. headers_clean-y += HEADERCLEAN_libpthread/linuxthreads.old_db
  56. HEADERCLEAN_libpthread/linuxthreads.old_db:
  57. $(do_rm) $(linuxthreads_db_headers)
  58. CLEAN_libpthread/linuxthreads.old_db:
  59. $(do_rm) $(addprefix $(libthread_db_OUT)/*., o os oS a)