Makefile.in 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. include $(top_srcdir)libc/stdlib/malloc/Makefile.in
  8. include $(top_srcdir)libc/stdlib/malloc-simple/Makefile.in
  9. include $(top_srcdir)libc/stdlib/malloc-standard/Makefile.in
  10. CSRC := \
  11. abort.c getenv.c mkdtemp.c mktemp.c realpath.c mkstemp.c \
  12. rand.c random.c random_r.c setenv.c system.c div.c ldiv.c lldiv.c \
  13. getpt.c drand48-iter.c jrand48.c \
  14. jrand48_r.c lrand48.c lrand48_r.c mrand48.c mrand48_r.c nrand48.c \
  15. nrand48_r.c rand_r.c srand48.c srand48_r.c seed48.c seed48_r.c \
  16. valloc.c a64l.c l64a.c __uc_malloc.c
  17. ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
  18. CSRC += posix_memalign.c
  19. endif
  20. ifeq ($(UCLIBC_HAS_PTY),y)
  21. CSRC += grantpt.c unlockpt.c ptsname.c
  22. endif
  23. ifeq ($(UCLIBC_HAS_ARC4RANDOM),y)
  24. CSRC += arc4random.c
  25. endif
  26. ifeq ($(UCLIBC_HAS_LFS),y)
  27. CSRC += mkstemp64.c
  28. endif
  29. ifeq ($(UCLIBC_HAS_FLOATS),y)
  30. CSRC += drand48.c drand48_r.c erand48.c erand48_r.c
  31. ifeq ($(UCLIBC_SUSV3_LEGACY),y)
  32. CSRC += gcvt.c
  33. endif
  34. endif
  35. # multi source stdlib.c
  36. CSRC += abs.c labs.c atoi.c atol.c strtol.c strtoul.c _stdlib_strto_l.c \
  37. qsort.c bsearch.c \
  38. llabs.c atoll.c strtoll.c strtoull.c _stdlib_strto_ll.c
  39. # (aliases) strtoq.o strtouq.o
  40. ifeq ($(UCLIBC_HAS_FLOATS),y)
  41. CSRC += atof.c
  42. endif
  43. ifeq ($(UCLIBC_HAS_XLOCALE),y)
  44. CSRC += strtol_l.c strtoul_l.c _stdlib_strto_l_l.c \
  45. strtoll_l.c strtoull_l.c _stdlib_strto_ll_l.c
  46. endif
  47. ifeq ($(UCLIBC_HAS_WCHAR),y)
  48. CSRC += mblen.c mbtowc.c wctomb.c mbstowcs.c wcstombs.c \
  49. _stdlib_mb_cur_max.c _stdlib_wcsto_l.c _stdlib_wcsto_ll.c \
  50. wcstol.c wcstoul.c wcstoll.c wcstoull.c
  51. ifeq ($(UCLIBC_HAS_XLOCALE),y)
  52. CSRC +=_stdlib_wcsto_l_l.c _stdlib_wcsto_ll_l.c \
  53. wcstol_l.c wcstoul_l.c wcstoll_l.c wcstoull_l.c
  54. endif
  55. endif
  56. # multi source _strtod.c
  57. ifeq ($(UCLIBC_HAS_FLOATS),y)
  58. CSRC += strtod.c strtof.c strtold.c __strtofpmax.c __fp_range_check.c
  59. ifeq ($(UCLIBC_HAS_XLOCALE),y)
  60. CSRC += strtod_l.c strtof_l.c strtold_l.c __strtofpmax_l.c
  61. endif
  62. ifeq ($(UCLIBC_HAS_WCHAR),y)
  63. CSRC += wcstod.c wcstof.c wcstold.c __wcstofpmax.c
  64. ifeq ($(UCLIBC_HAS_XLOCALE),y)
  65. CSRC += wcstod_l.c wcstof_l.c wcstold_l.c __wcstofpmax_l.c
  66. endif
  67. endif
  68. endif
  69. # (aliases) wcstoq.o wcstouq.o
  70. # wcstod wcstof wcstold
  71. # multi source _atexit.c
  72. CSRC += __cxa_atexit.c __cxa_finalize.c __exit_handler.c exit.c on_exit.c
  73. ifeq ($(COMPAT_ATEXIT),y)
  74. CSRC += old_atexit.c
  75. endif
  76. STDLIB_DIR := $(top_srcdir)libc/stdlib
  77. STDLIB_OUT := $(top_builddir)libc/stdlib
  78. STDLIB_SRC := $(patsubst %.c,$(STDLIB_DIR)/%.c,$(CSRC))
  79. STDLIB_OBJ := $(patsubst %.c,$(STDLIB_OUT)/%.o,$(CSRC))
  80. libc-y += $(STDLIB_OBJ)
  81. libc-static-y += $(STDLIB_OUT)/atexit.o
  82. # this should always be the PIC version, because it could be used in shared libs
  83. libc-nonshared-y += $(STDLIB_OUT)/atexit.os
  84. libc-nomulti-y += $(STDLIB_OUT)/labs.o $(STDLIB_OUT)/atol.o $(STDLIB_OUT)/_stdlib_strto_l.o $(STDLIB_OUT)/_stdlib_strto_ll.o
  85. libc-nomulti-$(UCLIBC_HAS_XLOCALE) += $(STDLIB_OUT)/_stdlib_strto_l_l.o $(STDLIB_OUT)/_stdlib_strto_ll_l.o
  86. objclean-y += stdlib_clean
  87. stdlib_clean:
  88. $(do_rm) $(addprefix $(STDLIB_OUT)/*., o os oS)