3 # Copyright (C) 2004 Manuel Novoa III <mjn3@uclibc.org>
4 # Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
6 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
8 # Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details.
15 fclose.c fcloseall.c fdopen.c fgetpos.c fopen.c freopen.c \
16 fseeko.c fsetpos.c ftello.c getdelim.c getline.c gets.c getw.c \
17 perror.c puts.c putw.c remove.c rewind.c setbuf.c setbuffer.c \
18 setlinebuf.c setvbuf.c ungetc.c \
19 printf.c vprintf.c vsprintf.c fprintf.c snprintf.c dprintf.c \
20 asprintf.c sprintf.c vasprintf.c vdprintf.c vsnprintf.c \
21 tmpfile.c popen.c ctermid.c
22 CSRC-y
+= fgetpos64.c fopen64.c freopen64.c fseeko64.c fsetpos64.c ftello64.c
23 CSRC-
$(UCLIBC_SUSV4_LEGACY
) += tmpnam.c tmpnam_r.c tempnam.c
25 # internal support functions
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 CSRC-
$(UCLIBC_HAS_FLOATS
) += _fpmaxtostr.c
32 # stdio_ext.h functions
34 __fbufsize.c __flbf.c __fpending.c __fpurge.c __freadable.c \
35 __freading.c __fsetlocking.c __fwritable.c __fwriting.c _flushlbf.c
37 # Other glibc extensions
38 CSRC-
$(UCLIBC_HAS_GLIBC_CUSTOM_STREAMS
) += fopencookie.c fmemopen.c \
42 CSRC-y
+= flockfile.c ftrylockfile.c funlockfile.c
44 # Functions with unlocked versions
46 clearerr.c feof.c ferror.c fflush.c fgetc.c fgets.c fileno.c \
47 fputc.c fputs.c fread.c fwrite.c getchar.c putchar.c
48 # getc_unlocked -> alias for fgetc_unlocked
49 # putc_unlocked -> alias for fputc_unlocked
51 # vfprintf and support functions
52 ifeq ($(USE_OLD_VFPRINTF
),y
)
53 VF_CSRC
:= old_vfprintf.c
55 # multi source _vfprintf.c
58 _vfprintf_internal.c \
59 _ppfs_init.c _ppfs_prepargs.c _ppfs_setargs.c _ppfs_parsespec.c \
60 register_printf_function.c parse_printf_format.c
64 # vfscanf and support functions plus other *scanf funcs
66 vfscanf.c __scan_cookie.c __psfs_parse_spec.c __psfs_do_numeric.c \
67 scanf.c sscanf.c fscanf.c vscanf.c vsscanf.c
69 CSRC-
$(UCLIBC_HAS_WCHAR
) += \
70 _wfwrite.c fwprintf.c swprintf.c vswprintf.c vwprintf.c wprintf.c \
72 CUSRC-
$(UCLIBC_HAS_WCHAR
) += \
73 fgetwc.c getwchar.c fgetws.c fputwc.c putwchar.c fputws.c
74 # getwc (fgetwc alias) getwc_unlocked (fgetwc_unlocked alias)
75 # putwc (fputwc alias) putwc_unlocked (fputwc_unlocked alias)
76 CSRC-
$(UCLIBC_HAS_WCHAR
) += vfwprintf.c _vfwprintf_internal.c \
77 wscanf.c swscanf.c fwscanf.c vwscanf.c vswscanf.c vfwscanf.c
79 CUSRC_UNLOCKED
:= $(patsubst %.c
,%_unlocked.c
,$(CUSRC-y
))
80 CSRC-y
+= $(CUSRC-y
) $(CUSRC_UNLOCKED
)
82 STDIO_DIR
:= $(top_srcdir
)libc
/stdio
83 STDIO_OUT
:= $(top_builddir
)libc
/stdio
85 STDIO_SRC
:= $(patsubst %.c
,$(STDIO_DIR
)/%.c
,$(CSRC-y
))
86 STDIO_OBJ
:= $(patsubst %.c
,$(STDIO_OUT
)/%.o
,$(CSRC-y
))
88 libc-y
+= $(STDIO_OBJ
)
90 ifneq ($(USE_OLD_VFPRINTF
),y
)
91 libc-nomulti-y
+= $(patsubst %.c
,$(STDIO_OUT
)/%.o
,$(VF_CSRC
))
93 libc-nomulti-
$(UCLIBC_HAS_WCHAR
) += $(STDIO_OUT
)/vfwprintf.o \
94 $(STDIO_OUT
)/vfwscanf.o
96 objclean-y
+= CLEAN_libc
/stdio
99 $(do_rm
) $(addprefix $(STDIO_OUT
)/*.
, o os oS
)