Makefile.in 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 += libresolv
  8. CFLAGS-libresolv := -DNOT_IN_libc -DIS_IN_libresolv $(SSP_ALL_CFLAGS)
  9. LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-libresolv.so := -Wl,--dsbt-index=7
  10. LDFLAGS-libresolv.so := $(LDFLAGS) $(call link.asneeded,-lc)
  11. LIBS-libresolv.so := $(LIBS)
  12. libresolv_FULL_NAME := libresolv-$(VERSION).so
  13. libresolv_DIR := $(top_srcdir)libresolv
  14. libresolv_OUT := $(top_builddir)libresolv
  15. libresolv_SRC := $(libresolv_DIR)/resolv.c
  16. libresolv_OBJ := $(patsubst $(libresolv_DIR)/%.c,$(libresolv_OUT)/%.o,$(libresolv_SRC))
  17. ifeq ($(DOPIC),y)
  18. libresolv-a-y := $(libresolv_OBJ:.o=.os)
  19. else
  20. libresolv-a-y := $(libresolv_OBJ)
  21. endif
  22. libresolv-so-y := $(libresolv_OBJ:.o=.os)
  23. lib-a-$(UCLIBC_HAS_LIBRESOLV_STUB) += $(top_builddir)lib/libresolv.a
  24. lib-so-$(UCLIBC_HAS_LIBRESOLV_STUB) += $(top_builddir)lib/libresolv.so
  25. objclean-y += CLEAN_libresolv
  26. ifeq ($(DOPIC),y)
  27. $(top_builddir)lib/libresolv.so: $(top_builddir)lib/libresolv.a $(libc.depend)
  28. else
  29. $(top_builddir)lib/libresolv.so: $(libresolv_OUT)/libresolv_so.a $(libc.depend)
  30. endif
  31. $(call link.so,$(libresolv_FULL_NAME),$(ABI_VERSION))
  32. # link for backward compatibility
  33. $(call link.so,$(libresolv_FULL_NAME),0)
  34. $(libresolv_OUT)/libresolv_so.a: $(libresolv-so-y)
  35. $(Q)$(RM) $@
  36. $(do_ar)
  37. $(top_builddir)lib/libresolv.a: $(libresolv-a-y)
  38. $(Q)$(INSTALL) -d $(dir $@)
  39. $(Q)$(RM) $@
  40. $(do_ar)
  41. CLEAN_libresolv:
  42. $(do_rm) $(addprefix $(libresolv_OUT)/*., o os a)