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