Makefile.in 1.4 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 += libnsl
  8. CFLAGS-libnsl := -DNOT_IN_libc -DIS_IN_libnsl $(SSP_ALL_CFLAGS)
  9. LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-libnsl.so := -Wl,--dsbt-index=6
  10. LDFLAGS-libnsl.so := $(LDFLAGS) $(call link.asneeded,-lc)
  11. LIBS-libnsl.so := $(LIBS)
  12. libnsl_FULL_NAME := libnsl-$(VERSION).so
  13. libnsl_DIR := $(top_srcdir)libnsl
  14. libnsl_OUT := $(top_builddir)libnsl
  15. libnsl_SRC := $(libnsl_DIR)/nsl.c
  16. libnsl_OBJ := $(patsubst $(libnsl_DIR)/%.c,$(libnsl_OUT)/%.o,$(libnsl_SRC))
  17. ifeq ($(DOPIC),y)
  18. libnsl-a-y := $(libnsl_OBJ:.o=.os)
  19. else
  20. libnsl-a-y := $(libnsl_OBJ)
  21. endif
  22. libnsl-so-y := $(libnsl_OBJ:.o=.os)
  23. lib-a-$(UCLIBC_HAS_LIBNSL_STUB) += $(top_builddir)lib/libnsl.a
  24. lib-so-$(UCLIBC_HAS_LIBNSL_STUB) += $(top_builddir)lib/libnsl.so
  25. objclean-y += CLEAN_libnsl
  26. ifeq ($(DOPIC),y)
  27. $(top_builddir)lib/libnsl.so: $(top_builddir)lib/libnsl.a $(libc.depend)
  28. else
  29. $(top_builddir)lib/libnsl.so: $(libnsl_OUT)/libnsl_so.a $(libc.depend)
  30. endif
  31. $(call link.so,$(libnsl_FULL_NAME),$(ABI_VERSION))
  32. # link for backward compatibility
  33. $(call link.so,$(libnsl_FULL_NAME),0)
  34. $(libnsl_OUT)/libnsl_so.a: $(libnsl-so-y)
  35. $(Q)$(RM) $@
  36. $(do_ar)
  37. $(top_builddir)lib/libnsl.a: $(libnsl-a-y)
  38. $(Q)$(INSTALL) -d $(dir $@)
  39. $(Q)$(RM) $@
  40. $(do_ar)
  41. CLEAN_libnsl:
  42. $(do_rm) $(addprefix $(libnsl_OUT)/*., o os a)