Makefile.in 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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-libresolv.so := $(LDFLAGS) $(call link.asneeded,-lc)
  10. LIBS-libresolv.so := $(LIBS)
  11. libresolv_FULL_NAME := libresolv-$(VERSION).so
  12. libresolv_DIR := $(top_srcdir)libresolv
  13. libresolv_OUT := $(top_builddir)libresolv
  14. libresolv_SRC := $(libresolv_DIR)/resolv.c
  15. libresolv_OBJ := $(patsubst $(libresolv_DIR)/%.c,$(libresolv_OUT)/%.o,$(libresolv_SRC))
  16. ifeq ($(DOPIC),y)
  17. libresolv-a-y := $(libresolv_OBJ:.o=.os)
  18. else
  19. libresolv-a-y := $(libresolv_OBJ)
  20. endif
  21. libresolv-so-y := $(libresolv_OBJ:.o=.os)
  22. lib-a-$(UCLIBC_HAS_RESOLV_STUB) += $(top_builddir)lib/libresolv.a
  23. lib-so-$(UCLIBC_HAS_RESOLV_STUB) += $(top_builddir)lib/libresolv.so
  24. objclean-y += libresolv_clean
  25. ifeq ($(DOPIC),y)
  26. $(top_builddir)lib/libresolv.so: $(top_builddir)lib/libresolv.a $(libc.depend)
  27. else
  28. $(top_builddir)lib/libresolv.so: $(libresolv_OUT)/libresolv_so.a $(libc.depend)
  29. endif
  30. $(call link.so,$(libresolv_FULL_NAME),$(MAJOR_VERSION))
  31. $(libresolv_OUT)/libresolv_so.a: $(libresolv-so-y)
  32. $(Q)$(RM) $@
  33. $(do_ar)
  34. $(top_builddir)lib/libresolv.a: $(libresolv-a-y)
  35. $(Q)$(INSTALL) -d $(dir $@)
  36. $(Q)$(RM) $@
  37. $(do_ar)
  38. libresolv_clean:
  39. $(do_rm) $(addprefix $(libresolv_OUT)/*., o os a)