summaryrefslogtreecommitdiff
path: root/libc/stdio/Makefile.in
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2013-02-05 18:54:24 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2013-02-05 18:55:08 +0100
commit1b3025b7352f5e432ffa1c7adc57085ac9092b77 (patch)
treebb94261d0cf3f76b7bc206a8aa2e69b2419b3944 /libc/stdio/Makefile.in
parentaeac3e1220a8afc856bd25e4d87441a26588aac0 (diff)
buildsys: switch libc to kbuild-style
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/stdio/Makefile.in')
-rw-r--r--libc/stdio/Makefile.in72
1 files changed, 30 insertions, 42 deletions
diff --git a/libc/stdio/Makefile.in b/libc/stdio/Makefile.in
index ff77bcb6a..7d697bf82 100644
--- a/libc/stdio/Makefile.in
+++ b/libc/stdio/Makefile.in
@@ -11,7 +11,7 @@
subdirs += libc/stdio
# SUSv3 functions
-CSRC := \
+CSRC-y := \
fclose.c fcloseall.c fdopen.c fgetpos.c fopen.c freopen.c \
fseeko.c fsetpos.c ftello.c getdelim.c getline.c gets.c getw.c \
perror.c puts.c putw.c remove.c rewind.c setbuf.c setbuffer.c \
@@ -19,92 +19,80 @@ CSRC := \
printf.c vprintf.c vsprintf.c fprintf.c snprintf.c dprintf.c \
asprintf.c sprintf.c vasprintf.c vdprintf.c vsnprintf.c \
tmpfile.c popen.c ctermid.c
+CSRC-$(UCLIBC_HAS_LFS) += fgetpos64.c fopen64.c freopen64.c \
+ fseeko64.c fsetpos64.c ftello64.c
+CSRC-$(UCLIBC_SUSV4_LEGACY) += tmpnam.c tmpnam_r.c tempnam.c
-ifeq ($(UCLIBC_HAS_LFS),y)
-CSRC += fgetpos64.c fopen64.c freopen64.c fseeko64.c fsetpos64.c ftello64.c
-endif
-ifeq ($(UCLIBC_SUSV4_LEGACY),y)
-CSRC += tmpnam.c tmpnam_r.c tempnam.c
-endif
-
-# getc -> alias for fgetc
-# putc -> alias for fputc
-# rename is a syscall
-
-# Implementation support functions
-CSRC += \
+# internal support functions
+CSRC-y += \
_READ.c _WRITE.c _adjust_pos.c _fopen.c _fwrite.c \
_rfill.c _stdio.c _trans2r.c _trans2w.c _wcommit.c \
_cs_funcs.c _load_inttype.c _store_inttype.c _uintmaxtostr.c
-ifeq ($(UCLIBC_HAS_FLOATS),y)
-CSRC += _fpmaxtostr.c
-endif
+CSRC-$(UCLIBC_HAS_FLOATS) += _fpmaxtostr.c
# stdio_ext.h functions
-CSRC += \
+CSRC-y += \
__fbufsize.c __flbf.c __fpending.c __fpurge.c __freadable.c \
__freading.c __fsetlocking.c __fwritable.c __fwriting.c _flushlbf.c
# Other glibc extensions
-ifeq ($(UCLIBC_HAS_GLIBC_CUSTOM_STREAMS),y)
-CSRC += fopencookie.c fmemopen.c open_memstream.c
-endif
+CSRC-$(UCLIBC_HAS_GLIBC_CUSTOM_STREAMS) += fopencookie.c fmemopen.c \
+ open_memstream.c
# pthread functions
-CSRC += flockfile.c ftrylockfile.c funlockfile.c
+CSRC-y += flockfile.c ftrylockfile.c funlockfile.c
# Functions with unlocked versions
-CUSRC := \
+CUSRC-y := \
clearerr.c feof.c ferror.c fflush.c fgetc.c fgets.c fileno.c \
fputc.c fputs.c fread.c fwrite.c getchar.c putchar.c
# getc_unlocked -> alias for fgetc_unlocked
# putc_unlocked -> alias for fputc_unlocked
# vfprintf and support functions
-ifneq ($(USE_OLD_VFPRINTF),y)
+ifeq ($(USE_OLD_VFPRINTF),y)
+VF_CSRC := old_vfprintf.c
+else
+# multi source _vfprintf.c
VF_CSRC := \
vfprintf.c \
_vfprintf_internal.c \
_ppfs_init.c _ppfs_prepargs.c _ppfs_setargs.c _ppfs_parsespec.c \
register_printf_function.c parse_printf_format.c
-CSRC += $(VF_CSRC)
-else
-CSRC += old_vfprintf.c
endif
+CSRC-y += $(VF_CSRC)
# vfscanf and support functions plus other *scanf funcs
-CSRC += \
+CSRC-y += \
vfscanf.c __scan_cookie.c __psfs_parse_spec.c __psfs_do_numeric.c \
scanf.c sscanf.c fscanf.c vscanf.c vsscanf.c
-ifeq ($(UCLIBC_HAS_WCHAR),y)
-CSRC += _wfwrite.c fwprintf.c swprintf.c vswprintf.c vwprintf.c wprintf.c \
+CSRC-$(UCLIBC_HAS_WCHAR) += \
+ _wfwrite.c fwprintf.c swprintf.c vswprintf.c vwprintf.c wprintf.c \
fwide.c ungetwc.c
-CUSRC += fgetwc.c getwchar.c fgetws.c fputwc.c putwchar.c fputws.c
+CUSRC-$(UCLIBC_HAS_WCHAR) += \
+ fgetwc.c getwchar.c fgetws.c fputwc.c putwchar.c fputws.c
# getwc (fgetwc alias) getwc_unlocked (fgetwc_unlocked alias)
# putwc (fputwc alias) putwc_unlocked (fputwc_unlocked alias)
-CSRC += vfwprintf.c _vfwprintf_internal.c
-CSRC += wscanf.c swscanf.c fwscanf.c vwscanf.c vswscanf.c vfwscanf.c
-endif
-
-CUSRC_UNLOCKED := $(patsubst %.c,%_unlocked.c,$(CUSRC))
+CSRC-$(UCLIBC_HAS_WCHAR) += vfwprintf.c _vfwprintf_internal.c \
+ wscanf.c swscanf.c fwscanf.c vwscanf.c vswscanf.c vfwscanf.c
-CSRC += $(CUSRC) $(CUSRC_UNLOCKED)
+CUSRC_UNLOCKED := $(patsubst %.c,%_unlocked.c,$(CUSRC-y))
+CSRC-y += $(CUSRC-y) $(CUSRC_UNLOCKED)
STDIO_DIR := $(top_srcdir)libc/stdio
STDIO_OUT := $(top_builddir)libc/stdio
-STDIO_SRC := $(patsubst %.c,$(STDIO_DIR)/%.c,$(CSRC))
-STDIO_OBJ := $(patsubst %.c,$(STDIO_OUT)/%.o,$(CSRC))
+STDIO_SRC := $(patsubst %.c,$(STDIO_DIR)/%.c,$(CSRC-y))
+STDIO_OBJ := $(patsubst %.c,$(STDIO_OUT)/%.o,$(CSRC-y))
libc-y += $(STDIO_OBJ)
ifneq ($(USE_OLD_VFPRINTF),y)
libc-nomulti-y += $(patsubst %.c,$(STDIO_OUT)/%.o,$(VF_CSRC))
endif
-ifeq ($(UCLIBC_HAS_WCHAR),y)
-libc-nomulti-y += $(STDIO_OUT)/vfwprintf.o $(STDIO_OUT)/vfwscanf.o
-endif
+libc-nomulti-$(UCLIBC_HAS_WCHAR) += $(STDIO_OUT)/vfwprintf.o \
+ $(STDIO_OUT)/vfwscanf.o
objclean-y += CLEAN_libc/stdio