Makefile.in 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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_CRYPT_STUB) += crypt_stub.c
  18. libcrypt_SRC := $(addprefix $(libcrypt_DIR)/,$(libcrypt_SRC-y))
  19. libcrypt_OBJ := $(patsubst $(libcrypt_DIR)/%.c,$(libcrypt_OUT)/%.o,$(libcrypt_SRC))
  20. ifeq ($(DOPIC),y)
  21. libcrypt-a-y := $(libcrypt_OBJ:.o=.os)
  22. else
  23. libcrypt-a-y := $(libcrypt_OBJ)
  24. endif
  25. libcrypt-so-y := $(libcrypt_OBJ:.o=.os)
  26. lib-a-$(UCLIBC_HAS_CRYPT) += $(top_builddir)lib/libcrypt.a
  27. lib-so-$(UCLIBC_HAS_CRYPT) += $(top_builddir)lib/libcrypt.so
  28. objclean-y += CLEAN_libcrypt
  29. ifeq ($(DOMULTI),n)
  30. ifeq ($(DOPIC),y)
  31. $(top_builddir)lib/libcrypt.so: $(top_builddir)lib/libcrypt.a $(libc.depend)
  32. else
  33. $(top_builddir)lib/libcrypt.so: $(libcrypt_OUT)/libcrypt_so.a $(libc.depend)
  34. endif
  35. $(call link.so,$(libcrypt_FULL_NAME),$(ABI_VERSION))
  36. else
  37. $(top_builddir)lib/libcrypt.so: $(libcrypt_OUT)/libcrypt.oS | $(libc.depend)
  38. $(call linkm.so,$(libcrypt_FULL_NAME),$(ABI_VERSION))
  39. endif
  40. $(libcrypt_OUT)/libcrypt_so.a: $(libcrypt-so-y)
  41. $(Q)$(RM) $@
  42. $(do_ar)
  43. $(libcrypt_OUT)/libcrypt.oS: $(libcrypt_SRC)
  44. $(Q)$(RM) $@
  45. $(compile-m)
  46. $(top_builddir)lib/libcrypt.a: $(libcrypt-a-y)
  47. $(Q)$(INSTALL) -d $(dir $@)
  48. $(Q)$(RM) $@
  49. $(do_ar)
  50. CLEAN_libcrypt:
  51. $(do_rm) $(addprefix $(libcrypt_OUT)/*., o os oS a)