Makefile.in 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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-libcrypt.so := $(LDFLAGS)
  10. LIBS-libcrypt.so := $(LIBS)
  11. libcrypt_FULL_NAME := libcrypt-$(VERSION).so
  12. libcrypt_DIR := $(top_srcdir)libcrypt
  13. libcrypt_OUT := $(top_builddir)libcrypt
  14. ifeq ($(UCLIBC_HAS_CRYPT_IMPL),y)
  15. CSRC := crypt.c des.c md5.c
  16. endif
  17. ifeq ($(UCLIBC_HAS_CRYPT_STUB),y)
  18. CSRC := crypt_stub.c
  19. endif
  20. libcrypt_SRC := $(addprefix $(libcrypt_DIR)/,$(CSRC))
  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. ifeq ($(UCLIBC_HAS_CRYPT),y)
  29. lib-a-y += $(top_builddir)lib/libcrypt.a
  30. lib-so-y += $(top_builddir)lib/libcrypt.so
  31. endif
  32. objclean-y += libcrypt_clean
  33. ifeq ($(DOMULTI),n)
  34. ifeq ($(DOPIC),y)
  35. $(top_builddir)lib/libcrypt.so: $(top_builddir)lib/libcrypt.a $(libc.depend)
  36. else
  37. $(top_builddir)lib/libcrypt.so: $(libcrypt_OUT)/libcrypt_so.a $(libc.depend)
  38. endif
  39. $(call link.so,$(libcrypt_FULL_NAME),$(MAJOR_VERSION))
  40. else
  41. $(top_builddir)lib/libcrypt.so: $(libcrypt_OUT)/libcrypt.oS | $(libc.depend)
  42. $(call linkm.so,$(libcrypt_FULL_NAME),$(MAJOR_VERSION))
  43. endif
  44. $(libcrypt_OUT)/libcrypt_so.a: $(libcrypt-so-y)
  45. $(Q)$(RM) $@
  46. $(do_ar)
  47. $(libcrypt_OUT)/libcrypt.oS: $(libcrypt_SRC)
  48. $(Q)$(RM) $@
  49. $(compile-m)
  50. $(top_builddir)lib/libcrypt.a: $(libcrypt-a-y)
  51. $(Q)$(INSTALL) -d $(dir $@)
  52. $(Q)$(RM) $@
  53. $(do_ar)
  54. libcrypt_clean:
  55. $(do_rm) $(addprefix $(libcrypt_OUT)/*., o os oS a)