Makefile.in 1.7 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-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. libcrypt_SRC-y :=
  15. libcrypt_SRC-$(UCLIBC_HAS_CRYPT_IMPL) += crypt.c des.c md5.c
  16. libcrypt_SRC-$(UCLIBC_HAS_CRYPT_STUB) += crypt_stub.c
  17. libcrypt_SRC := $(addprefix $(libcrypt_DIR)/,$(libcrypt_SRC-y))
  18. libcrypt_OBJ := $(patsubst $(libcrypt_DIR)/%.c,$(libcrypt_OUT)/%.o,$(libcrypt_SRC))
  19. ifeq ($(DOPIC),y)
  20. libcrypt-a-y := $(libcrypt_OBJ:.o=.os)
  21. else
  22. libcrypt-a-y := $(libcrypt_OBJ)
  23. endif
  24. libcrypt-so-y := $(libcrypt_OBJ:.o=.os)
  25. lib-a-$(UCLIBC_HAS_CRYPT) += $(top_builddir)lib/libcrypt.a
  26. lib-so-$(UCLIBC_HAS_CRYPT) += $(top_builddir)lib/libcrypt.so
  27. objclean-y += libcrypt_clean
  28. ifeq ($(DOMULTI),n)
  29. ifeq ($(DOPIC),y)
  30. $(top_builddir)lib/libcrypt.so: $(top_builddir)lib/libcrypt.a $(libc.depend)
  31. else
  32. $(top_builddir)lib/libcrypt.so: $(libcrypt_OUT)/libcrypt_so.a $(libc.depend)
  33. endif
  34. $(call link.so,$(libcrypt_FULL_NAME),$(MAJOR_VERSION))
  35. else
  36. $(top_builddir)lib/libcrypt.so: $(libcrypt_OUT)/libcrypt.oS | $(libc.depend)
  37. $(call linkm.so,$(libcrypt_FULL_NAME),$(MAJOR_VERSION))
  38. endif
  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. libcrypt_clean:
  50. $(do_rm) $(addprefix $(libcrypt_OUT)/*., o os oS a)