Makefile.in 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 ($(DOPIC),y)
  32. $(top_builddir)lib/libcrypt.so: $(top_builddir)lib/libcrypt.a $(libc.depend)
  33. else
  34. $(top_builddir)lib/libcrypt.so: $(libcrypt_OUT)/libcrypt_so.a $(libc.depend)
  35. endif
  36. $(call link.so,$(libcrypt_FULL_NAME),$(ABI_VERSION))
  37. # link for backward compatibility
  38. $(call link.so,$(libcrypt_FULL_NAME),0)
  39. $(libcrypt_OUT)/libcrypt_so.a: $(libcrypt-so-y)
  40. $(Q)$(RM) $@
  41. $(do_ar)
  42. $(libcrypt_OUT)/libcrypt.oS: $(libcrypt_SRC)
  43. $(Q)$(RM) $@
  44. $(compile-m)
  45. $(top_builddir)lib/libcrypt.a: $(libcrypt-a-y)
  46. $(Q)$(INSTALL) -d $(dir $@)
  47. $(Q)$(RM) $@
  48. $(do_ar)
  49. CLEAN_libcrypt:
  50. $(do_rm) $(addprefix $(libcrypt_OUT)/*., o os oS a)