Makefile.in 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. # Get the thread include dependencies and shared object name
  8. CFLAGS-linuxthreads_db := -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
  9. CFLAGS-linuxthreads_db += -D_GNU_SOURCE
  10. LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) -s --warn-unresolved-symbols
  11. LIBS-libthread_db.so := $(LIBS)
  12. libthread_db_FULL_NAME := libthread_db-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
  13. libthread_db_DIR := $(top_srcdir)libpthread/linuxthreads_db
  14. libthread_db_OUT := $(top_builddir)libpthread/linuxthreads_db
  15. libthread_db_SRC := $(wildcard $(libthread_db_DIR)/*.c)
  16. libthread_db_OBJ := $(patsubst $(libthread_db_DIR)/%.c,$(libthread_db_OUT)/%.o,$(libthread_db_SRC))
  17. libthread_db-so-y := $(libthread_db_OBJ:.o=.os)
  18. ifeq ($(DOPIC),y)
  19. libthread_db-a-y := $(libthread_db-so-y)
  20. else
  21. libthread_db-a-y := $(libthread_db_OBJ)
  22. endif
  23. libthread_db-multi-y := $(libthread_db_SRC)
  24. lib-a-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.a
  25. lib-so-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.so
  26. objclean-y += libthread_db_clean
  27. headers-$(PTHREADS_DEBUG_SUPPORT) += linuxthreads_db_headers
  28. headers_clean-y += linuxthreads_db_headers_clean
  29. ifeq ($(DOPIC),y)
  30. $(top_builddir)lib/libthread_db.so: $(top_builddir)lib/libthread_db.a $(libc)
  31. else
  32. $(top_builddir)lib/libthread_db.so: $(libthread_db_OUT)/libthread_db_so.a $(libc)
  33. endif
  34. $(call link.so,$(libthread_db_FULL_NAME),1)
  35. $(libthread_db_OUT)/libthread_db_so.a: $(libthread_db-so-y)
  36. $(Q)$(RM) $@
  37. $(do_strip)
  38. $(do_ar)
  39. $(top_builddir)lib/libthread_db.a: $(libthread_db-a-y)
  40. $(Q)$(INSTALL) -d $(dir $@)
  41. $(Q)$(RM) $@
  42. $(do_strip)
  43. $(do_ar)
  44. linuxthreads_db_headers:
  45. $(LN) -sf ../$(PTDIR)_db/thread_db.h $(top_builddir)include/
  46. linuxthreads_db_headers_clean:
  47. $(RM) $(top_builddir)include/thread_db.h
  48. libthread_db_clean:
  49. $(RM) $(libthread_db_OUT)/*.{o,os,a}