Makefile.in 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. $(libresolv_OUT)/libresolv_so.a: $(libresolv-so-y)
  33. $(Q)$(RM) $@
  34. $(do_ar)
  35. $(top_builddir)lib/libresolv.a: $(libresolv-a-y)
  36. $(Q)$(INSTALL) -d $(dir $@)
  37. $(Q)$(RM) $@
  38. $(do_ar)
  39. CLEAN_libresolv:
  40. $(do_rm) $(addprefix $(libresolv_OUT)/*., o os a)