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