Makefile.in 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Makefile for uClibc
  2. #
  3. # Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
  4. #
  5. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  6. #
  7. # order is relevant
  8. -include $(top_srcdir)libc/string/$(TARGET_ARCH)/Makefile.arch
  9. include $(top_srcdir)libc/string/generic/Makefile.in
  10. STRING_DIR:=$(top_srcdir)libc/string
  11. STRING_OUT:=$(top_builddir)libc/string
  12. STRING_ALL_WXSRC:=$(wildcard $(STRING_DIR)/w*_l.c)
  13. ifeq ($(UCLIBC_HAS_LOCALE),y)
  14. STRING_WXSRC:=$(STRING_ALL_WXSRC)
  15. else
  16. # wcscoll_l
  17. STRING_WXSRC:=$(filter-out $(STRING_DIR)/wcsxfrm_l.c,$(STRING_ALL_WXSRC))
  18. endif
  19. STRING_ALL_XLSRC:=$(filter-out $(STRING_ALL_WXSRC),$(wildcard $(STRING_DIR)/*_l.c))
  20. ifeq ($(UCLIBC_HAS_LOCALE),y)
  21. STRING_XLSRC:=$(STRING_ALL_XLSRC)
  22. else
  23. # strcoll_l
  24. STRING_XLSRC:=$(filter-out $(STRING_DIR)/strxfrm_l.c,$(STRING_ALL_XLSRC))
  25. endif
  26. STRING_ALL_WSRC:=$(filter-out $(STRING_ALL_WXSRC),$(wildcard $(STRING_DIR)/w*.c))
  27. ifeq ($(UCLIBC_HAS_LOCALE),y)
  28. STRING_WSRC:=$(STRING_ALL_WSRC)
  29. else
  30. # wcscoll
  31. STRING_WSRC:=$(filter-out $(STRING_DIR)/wcsxfrm.c,$(STRING_ALL_WSRC))
  32. endif
  33. STRING_ALL_CSRC:=$(filter-out $(STRING_ALL_WXSRC) $(STRING_ALL_XLSRC) $(STRING_ALL_WSRC) $(STRING_DIR)/_collate.c,$(wildcard $(STRING_DIR)/*.c))
  34. ifeq ($(UCLIBC_HAS_LOCALE),y)
  35. STRING_CSRC:=$(STRING_ALL_CSRC)
  36. else
  37. # strcoll
  38. STRING_CSRC:=$(filter-out $(STRING_DIR)/strxfrm.c,$(STRING_ALL_CSRC))
  39. endif
  40. ifeq ($(UCLIBC_HAS_WCHAR),y)
  41. STRING_CSRC+=$(STRING_WSRC)
  42. endif
  43. ifeq ($(UCLIBC_HAS_XLOCALE),y)
  44. STRING_CSRC+=$(STRING_XLSRC)
  45. ifeq ($(UCLIBC_HAS_WCHAR),y)
  46. STRING_CSRC+=$(STRING_WXSRC)
  47. endif
  48. endif
  49. ifeq ($(UCLIBC_HAS_STRING_ARCH_OPT),y)
  50. ifneq ($(strip $(STRING_ARCH_OBJS)),)
  51. STRING_CSRC:=$(filter-out $(patsubst %.o,$(STRING_DIR)/%.c,$(notdir $(STRING_ARCH_OBJS))),$(STRING_CSRC))
  52. endif
  53. endif
  54. ifeq ($(UCLIBC_HAS_STRING_GENERIC_OPT),y)
  55. ifneq ($(strip $(STRING_GENERIC_OBJS)),)
  56. STRING_CSRC:=$(filter-out $(patsubst %.o,$(STRING_DIR)/%.c,$(notdir $(STRING_GENERIC_OBJS))),$(STRING_CSRC))
  57. endif
  58. endif
  59. STRING_COBJ:=$(patsubst $(STRING_DIR)/%.c,$(STRING_OUT)/%.o,$(STRING_CSRC))
  60. libc-a-y+=$(STRING_COBJ)
  61. libc-so-y+=$(STRING_COBJ:.o=.os)
  62. libc-multi-y+=$(STRING_CSRC)
  63. objclean-y+=string_objclean
  64. string_objclean:
  65. $(RM) $(STRING_OUT)/{,*/}*.{o,os}