Makefile.in 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 += libcrypt
  8. CFLAGS-libcrypt := -DNOT_IN_libc -DIS_IN_libcrypt $(SSP_ALL_CFLAGS)
  9. LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-libcrypt.so := -Wl,--dsbt-index=4
  10. LDFLAGS-libcrypt.so := $(LDFLAGS)
  11. LIBS-libcrypt.so := $(LIBS)
  12. libcrypt_FULL_NAME := libcrypt-$(VERSION).so
  13. libcrypt_DIR := $(top_srcdir)libcrypt
  14. libcrypt_OUT := $(top_builddir)libcrypt
  15. libcrypt_SRC-y :=
  16. libcrypt_SRC-$(UCLIBC_HAS_CRYPT_IMPL) += crypt.c des.c md5.c
  17. libcrypt_SRC-$(UCLIBC_HAS_SHA256_CRYPT_IMPL) += sha256.c sha256-crypt.c
  18. libcrypt_SRC-$(UCLIBC_HAS_SHA512_CRYPT_IMPL) += sha512.c sha512-crypt.c
  19. libcrypt_SRC-$(UCLIBC_HAS_CRYPT_STUB) += crypt_stub.c
  20. libcrypt_SRC := $(addprefix $(libcrypt_DIR)/,$(libcrypt_SRC-y))
  21. libcrypt_OBJ := $(patsubst $(libcrypt_DIR)/%.c,$(libcrypt_OUT)/%.o,$(libcrypt_SRC))
  22. ifeq ($(DOPIC),y)
  23. libcrypt-a-y := $(libcrypt_OBJ:.o=.os)
  24. else
  25. libcrypt-a-y := $(libcrypt_OBJ)
  26. endif
  27. libcrypt-so-y := $(libcrypt_OBJ:.o=.os)
  28. lib-a-$(UCLIBC_HAS_CRYPT) += $(top_builddir)lib/libcrypt.a
  29. lib-so-$(UCLIBC_HAS_CRYPT) += $(top_builddir)lib/libcrypt.so
  30. objclean-y += CLEAN_libcrypt
  31. ifeq ($(DOMULTI),n)
  32. ifeq ($(DOPIC),y)
  33. $(top_builddir)lib/libcrypt.so: $(top_builddir)lib/libcrypt.a $(libc.depend)
  34. else
  35. $(top_builddir)lib/libcrypt.so: $(libcrypt_OUT)/libcrypt_so.a $(libc.depend)
  36. endif
  37. $(call link.so,$(libcrypt_FULL_NAME),$(ABI_VERSION))
  38. # link for backward compatibility
  39. $(call link.so,$(libcrypt_FULL_NAME),0)
  40. else
  41. $(top_builddir)lib/libcrypt.so: $(libcrypt_OUT)/libcrypt.oS | $(libc.depend)
  42. $(call linkm.so,$(libcrypt_FULL_NAME),$(ABI_VERSION))
  43. # link for backward compatibility
  44. $(call linkm.so,$(libcrypt_FULL_NAME),0)
  45. endif
  46. $(libcrypt_OUT)/libcrypt_so.a: $(libcrypt-so-y)
  47. $(Q)$(RM) $@
  48. $(do_ar)
  49. $(libcrypt_OUT)/libcrypt.oS: $(libcrypt_SRC)
  50. $(Q)$(RM) $@
  51. $(compile-m)
  52. $(top_builddir)lib/libcrypt.a: $(libcrypt-a-y)
  53. $(Q)$(INSTALL) -d $(dir $@)
  54. $(Q)$(RM) $@
  55. $(do_ar)
  56. CLEAN_libcrypt:
  57. $(do_rm) $(addprefix $(libcrypt_OUT)/*., o os oS a)