Makefile.in 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Makefile for uClibc
  2. #
  3. # Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  4. #
  5. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  6. #
  7. # Get the thread include dependencies and shared object name
  8. CFLAGS-linuxthreads_db := -DNOT_IN_libc -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
  9. LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) $(if $(call check_ld,--warn-unresolved-symbols),-Wl$(comma)--warn-unresolved-symbols)
  10. ifeq ($(DOSTRIP),y)
  11. LDFLAGS-libthread_db.so += -Wl,-s
  12. endif
  13. LIBS-libthread_db.so := $(LIBS)
  14. libthread_db_FULL_NAME := libthread_db-$(VERSION).so
  15. libthread_db_DIR := $(top_srcdir)libpthread/linuxthreads_db
  16. libthread_db_OUT := $(top_builddir)libpthread/linuxthreads_db
  17. libthread_db_SRC := $(wildcard $(libthread_db_DIR)/*.c)
  18. libthread_db_OBJ := $(patsubst $(libthread_db_DIR)/%.c,$(libthread_db_OUT)/%.o,$(libthread_db_SRC))
  19. libthread_db-so-y := $(libthread_db_OBJ:.o=.os)
  20. ifeq ($(DOPIC),y)
  21. libthread_db-a-y := $(libthread_db-so-y)
  22. else
  23. libthread_db-a-y := $(libthread_db_OBJ)
  24. endif
  25. lib-a-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.a
  26. lib-so-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.so
  27. #ifeq ($(DOMULTI),n)
  28. ifeq ($(DOPIC),y)
  29. $(top_builddir)lib/libthread_db.so: $(top_builddir)lib/libthread_db.a $(libc.depend)
  30. else
  31. $(top_builddir)lib/libthread_db.so: $(libthread_db_OUT)/libthread_db_so.a $(libc.depend)
  32. endif
  33. $(call link.so,$(libthread_db_FULL_NAME),1)
  34. #else
  35. #$(top_builddir)lib/libthread_db.so: $(libthread_db_OUT)/libthread_db.oS | $(libc.depend)
  36. # $(call linkm.so,$(libthread_db_FULL_NAME),1)
  37. #endif
  38. $(libthread_db_OUT)/libthread_db_so.a: $(libthread_db-so-y)
  39. $(Q)$(RM) $@
  40. $(do_ar)
  41. $(libthread_db_OUT)/libthread_db.oS: $(libthread_db_SRC)
  42. $(Q)$(RM) $@
  43. $(compile-m)
  44. $(top_builddir)lib/libthread_db.a: $(libthread_db-a-y)
  45. $(Q)$(INSTALL) -d $(dir $@)
  46. $(Q)$(RM) $@
  47. $(do_ar)
  48. include/thread_db.h:
  49. $(do_ln) ../$(PTDIR)_db/$(@F) $(top_builddir)$@
  50. linuxthreads_db_headers := include/thread_db.h
  51. $(linuxthreads_db_headers): include/config/linuxthreads/old.h \
  52. include/config/linuxthreads/new.h
  53. headers-$(PTHREADS_DEBUG_SUPPORT) += $(linuxthreads_db_headers)
  54. objclean-y += libthread_db_clean
  55. headers_clean-y += linuxthreads_db_headers_clean
  56. linuxthreads_db_headers_clean:
  57. $(RM) $(top_builddir)include/thread_db.h
  58. libthread_db_clean:
  59. $(RM) $(libthread_db_OUT)/*.{o,os,oS,a}