Makefile.in 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. else
  39. $(top_builddir)lib/libcrypt.so: $(libcrypt_OUT)/libcrypt.oS | $(libc.depend)
  40. $(call linkm.so,$(libcrypt_FULL_NAME),$(ABI_VERSION))
  41. endif
  42. $(libcrypt_OUT)/libcrypt_so.a: $(libcrypt-so-y)
  43. $(Q)$(RM) $@
  44. $(do_ar)
  45. $(libcrypt_OUT)/libcrypt.oS: $(libcrypt_SRC)
  46. $(Q)$(RM) $@
  47. $(compile-m)
  48. $(top_builddir)lib/libcrypt.a: $(libcrypt-a-y)
  49. $(Q)$(INSTALL) -d $(dir $@)
  50. $(Q)$(RM) $@
  51. $(do_ar)
  52. CLEAN_libcrypt:
  53. $(do_rm) $(addprefix $(libcrypt_OUT)/*., o os oS a)