Makefile.in 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. # Makefile for uClibc
  2. #
  3. # Copyright (C) 2004 Manuel Novoa III <mjn3@uclibc.org>
  4. # Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
  5. #
  6. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  7. #
  8. # Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details.
  9. #
  10. # SUSv3 functions
  11. CSRC := \
  12. fclose.c fcloseall.c fdopen.c fgetpos.c fopen.c freopen.c \
  13. fseeko.c fsetpos.c ftello.c getdelim.c getline.c gets.c getw.c \
  14. perror.c puts.c putw.c remove.c rewind.c setbuf.c setbuffer.c \
  15. setlinebuf.c setvbuf.c ungetc.c \
  16. printf.c vprintf.c vsprintf.c fprintf.c snprintf.c dprintf.c \
  17. asprintf.c sprintf.c vasprintf.c vdprintf.c vsnprintf.c \
  18. tmpfile.c tmpnam.c tmpnam_r.c popen.c tempnam.c ctermid.c
  19. ifeq ($(UCLIBC_HAS_LFS),y)
  20. CSRC += fgetpos64.c fopen64.c freopen64.c fseeko64.c fsetpos64.c ftello64.c
  21. endif
  22. # getc -> alias for fgetc
  23. # putc -> alias for fputc
  24. # rename is a syscall
  25. # Implementation support functions
  26. CSRC += \
  27. _READ.c _WRITE.c _adjust_pos.c _fopen.c _fwrite.c \
  28. _rfill.c _stdio.c _trans2r.c _trans2w.c _wcommit.c \
  29. _cs_funcs.c _load_inttype.c _store_inttype.c _uintmaxtostr.c
  30. ifeq ($(UCLIBC_HAS_FLOATS),y)
  31. CSRC += _fpmaxtostr.c
  32. endif
  33. # stdio_ext.h functions
  34. CSRC += \
  35. __fbufsize.c __flbf.c __fpending.c __fpurge.c __freadable.c \
  36. __freading.c __fsetlocking.c __fwritable.c __fwriting.c _flushlbf.c
  37. # Other glibc extensions
  38. ifeq ($(UCLIBC_HAS_GLIBC_CUSTOM_STREAMS),y)
  39. CSRC += fopencookie.c fmemopen.c open_memstream.c
  40. endif
  41. # pthread functions
  42. CSRC += flockfile.c ftrylockfile.c funlockfile.c
  43. # Functions with unlocked versions
  44. CUSRC := \
  45. clearerr.c feof.c ferror.c fflush.c fgetc.c fgets.c fileno.c \
  46. fputc.c fputs.c fread.c fwrite.c getchar.c putchar.c
  47. # getc_unlocked -> alias for fgetc_unlocked
  48. # putc_unlocked -> alias for fputc_unlocked
  49. # vfprintf and support functions
  50. ifneq ($(USE_OLD_VFPRINTF),y)
  51. VF_CSRC := \
  52. vfprintf.c \
  53. _vfprintf_internal.c \
  54. _ppfs_init.c _ppfs_prepargs.c _ppfs_setargs.c _ppfs_parsespec.c \
  55. register_printf_function.c parse_printf_format.c
  56. CSRC += $(VF_CSRC)
  57. else
  58. CSRC += old_vfprintf.c
  59. endif
  60. # vfscanf and support functions plus other *scanf funcs
  61. CSRC += \
  62. vfscanf.c __scan_cookie.c __psfs_parse_spec.c __psfs_do_numeric.c \
  63. scanf.c sscanf.c fscanf.c vscanf.c vsscanf.c
  64. ifeq ($(UCLIBC_HAS_WCHAR),y)
  65. CSRC += _wfwrite.c fwprintf.c swprintf.c vswprintf.c vwprintf.c wprintf.c \
  66. fwide.c ungetwc.c
  67. CUSRC += fgetwc.c getwchar.c fgetws.c fputwc.c putwchar.c fputws.c
  68. # getwc (fgetwc alias) getwc_unlocked (fgetwc_unlocked alias)
  69. # putwc (fputwc alias) putwc_unlocked (fputwc_unlocked alias)
  70. CSRC += vfwprintf.c _vfwprintf_internal.c
  71. CSRC += wscanf.c swscanf.c fwscanf.c vwscanf.c vswscanf.c vfwscanf.c
  72. endif
  73. CUSRC_UNLOCKED := $(patsubst %.c,%_unlocked.c,$(CUSRC))
  74. CSRC += $(CUSRC) $(CUSRC_UNLOCKED)
  75. STDIO_DIR := $(top_srcdir)libc/stdio
  76. STDIO_OUT := $(top_builddir)libc/stdio
  77. STDIO_SRC := $(patsubst %.c,$(STDIO_DIR)/%.c,$(CSRC))
  78. STDIO_OBJ := $(patsubst %.c,$(STDIO_OUT)/%.o,$(CSRC))
  79. libc-y += $(STDIO_OBJ)
  80. ifneq ($(USE_OLD_VFPRINTF),y)
  81. libc-nomulti-y += $(patsubst %.c,$(STDIO_OUT)/%.o,$(VF_CSRC))
  82. endif
  83. ifeq ($(UCLIBC_HAS_WCHAR),y)
  84. libc-nomulti-y += $(STDIO_OUT)/vfwprintf.o $(STDIO_OUT)/vfwscanf.o
  85. endif
  86. objclean-y += stdio_clean
  87. stdio_clean:
  88. $(do_rm) $(addprefix $(STDIO_OUT)/*., o os oS)