Makefile.in 1.3 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 += 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. $(libnsl_OUT)/libnsl_so.a: $(libnsl-so-y)
  33. $(Q)$(RM) $@
  34. $(do_ar)
  35. $(top_builddir)lib/libnsl.a: $(libnsl-a-y)
  36. $(Q)$(INSTALL) -d $(dir $@)
  37. $(Q)$(RM) $@
  38. $(do_ar)
  39. CLEAN_libnsl:
  40. $(do_rm) $(addprefix $(libnsl_OUT)/*., o os a)