Makefile.in 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Makefile.in 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 += ldso/libdl
  8. CFLAGS-libdl := -DNOT_IN_libc -DIS_IN_libdl $(SSP_ALL_CFLAGS)
  9. CFLAGS-libdl += -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) -I$(top_srcdir)ldso/include -I$(top_srcdir)ldso/ldso
  10. CFLAGS-libdl += -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\"
  11. ifeq ($(SUPPORT_LD_DEBUG),y)
  12. CFLAGS-libdl += -D__SUPPORT_LD_DEBUG__
  13. endif
  14. CFLAGS-libdl.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\"
  15. LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-libdl.so := -Wl,--dsbt-index=3
  16. LDFLAGS-libdl.so := $(LDFLAGS)
  17. ifeq ($(LDSO_NO_CLEANUP),)
  18. LDFLAGS-libdl.so += -Wl,-fini,$(SYMBOL_PREFIX)dl_cleanup
  19. endif
  20. LIBS-libdl.so := $(LIBS) $(ldso)
  21. libdl_FULL_NAME := libdl-$(VERSION).so
  22. libdl_DIR := $(top_srcdir)ldso/libdl
  23. libdl_OUT := $(top_builddir)ldso/libdl
  24. libdl_SRC := $(libdl_DIR)/libdl.c
  25. libdl_OBJ := $(patsubst $(libdl_DIR)/%.c,$(libdl_OUT)/%.o,$(libdl_SRC))
  26. resolve := $(top_builddir)ldso/ldso/$(TARGET_ARCH)/resolve.o
  27. libdl-a-y := $(libdl_OBJ) $(resolve)
  28. ifeq ($(DOPIC),y)
  29. libdl-a-y := $(libdl-a-y:.o=.os)
  30. endif
  31. libdl-so-y := $(libdl_OUT)/libdl.oS
  32. lib-a-$(HAVE_SHARED) += $(top_builddir)lib/libdl.a
  33. lib-so-y += $(top_builddir)lib/libdl.so
  34. objclean-y += CLEAN_ldso/libdl
  35. $(top_builddir)lib/libdl.so: $(libdl_OUT)/libdl_so.a $(libc.depend)
  36. $(call link.so,$(libdl_FULL_NAME),$(ABI_VERSION))
  37. $(libdl_OUT)/libdl_so.a: $(libdl-so-y)
  38. $(Q)$(RM) $@
  39. $(do_ar)
  40. $(top_builddir)lib/libdl.a: $(libdl-a-y)
  41. $(Q)$(INSTALL) -d $(dir $@)
  42. $(Q)$(RM) $@
  43. $(do_ar)
  44. CLEAN_ldso/libdl:
  45. $(do_rm) $(addprefix $(libdl_OUT)/*., o os oS a)