Makefile.in 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # Makefile for uClibc
  2. #
  3. # Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  4. #
  5. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  6. #
  7. CFLAGS-libcrypt := -DNOT_IN_libc -DIS_IN_libcrypt $(SSP_ALL_CFLAGS)
  8. LDFLAGS-libcrypt.so := $(LDFLAGS)
  9. LIBS-libcrypt.so := $(LIBS)
  10. libcrypt_FULL_NAME := libcrypt-$(VERSION).so
  11. libcrypt_DIR := $(top_srcdir)libcrypt
  12. libcrypt_OUT := $(top_builddir)libcrypt
  13. ifeq ($(UCLIBC_HAS_CRYPT_IMPL),y)
  14. CSRC := crypt.c des.c md5.c
  15. endif
  16. ifeq ($(UCLIBC_HAS_CRYPT_STUB),y)
  17. CSRC := crypt_stub.c
  18. endif
  19. libcrypt_SRC := $(addprefix $(libcrypt_DIR)/,$(CSRC))
  20. libcrypt_OBJ := $(patsubst $(libcrypt_DIR)/%.c,$(libcrypt_OUT)/%.o,$(libcrypt_SRC))
  21. ifeq ($(DOPIC),y)
  22. libcrypt-a-y := $(libcrypt_OBJ:.o=.os)
  23. else
  24. libcrypt-a-y := $(libcrypt_OBJ)
  25. endif
  26. libcrypt-so-y := $(libcrypt_OBJ:.o=.os)
  27. ifeq ($(UCLIBC_HAS_CRYPT),y)
  28. lib-a-y += $(top_builddir)lib/libcrypt.a
  29. lib-so-y += $(top_builddir)lib/libcrypt.so
  30. endif
  31. objclean-y += libcrypt_clean
  32. ifeq ($(DOMULTI),n)
  33. ifeq ($(DOPIC),y)
  34. $(top_builddir)lib/libcrypt.so: $(top_builddir)lib/libcrypt.a $(libc.depend)
  35. else
  36. $(top_builddir)lib/libcrypt.so: $(libcrypt_OUT)/libcrypt_so.a $(libc.depend)
  37. endif
  38. $(call link.so,$(libcrypt_FULL_NAME),$(MAJOR_VERSION))
  39. else
  40. $(top_builddir)lib/libcrypt.so: $(libcrypt_OUT)/libcrypt.oS | $(libc.depend)
  41. $(call linkm.so,$(libcrypt_FULL_NAME),$(MAJOR_VERSION))
  42. endif
  43. $(libcrypt_OUT)/libcrypt_so.a: $(libcrypt-so-y)
  44. $(Q)$(RM) $@
  45. $(do_ar)
  46. $(libcrypt_OUT)/libcrypt.oS: $(libcrypt_SRC)
  47. $(Q)$(RM) $@
  48. $(compile-m)
  49. $(top_builddir)lib/libcrypt.a: $(libcrypt-a-y)
  50. $(Q)$(INSTALL) -d $(dir $@)
  51. $(Q)$(RM) $@
  52. $(do_ar)
  53. libcrypt_clean:
  54. $(RM) $(libcrypt_OUT)/*.{o,os,oS,a}