* stdlib/bits/stdlib-ldbl.h (qecvt, qfcvt, qgcvt, qecvt_r,
[glibc.git] / libio / Makefile
blobe9c1d522fd0a12103d5e86adf293149bd6026998
1 # Copyright (C) 1995-2002,2003,2004,2006 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
4 # The GNU C Library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
9 # The GNU C Library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with the GNU C Library; if not, write to the Free
16 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 # 02111-1307 USA.
20 # Specific makefile for libio.
22 subdir := libio
24 headers := stdio.h libio.h _G_config.h bits/stdio.h bits/stdio-lock.h \
25 bits/sys_errlist.h bits/stdio2.h bits/stdio-ldbl.h bits/libio-ldbl.h
27 routines := \
28 filedoalloc iofclose iofdopen iofflush iofgetpos iofgets iofopen \
29 iofopncook iofputs iofread iofsetpos ioftell wfiledoalloc \
30 iofwrite iogetdelim iogetline iogets iopadn iopopen ioputs \
31 ioseekoff ioseekpos iosetbuffer iosetvbuf ioungetc \
32 iovsprintf iovsscanf \
33 iofgetpos64 iofopen64 iofsetpos64 \
34 fputwc fputwc_u getwc getwc_u getwchar getwchar_u iofgetws iofgetws_u \
35 iofputws iofputws_u iogetwline iowpadn ioungetwc putwc putwc_u \
36 putwchar putwchar_u putchar putchar_u fwprintf swprintf vwprintf \
37 wprintf wscanf fwscanf vwscanf vswprintf iovswscanf swscanf wgenops \
38 wstrops wfileops iofwide fwide wmemstream \
40 clearerr feof ferror fileno fputc freopen fseek getc getchar \
41 memstream pclose putc putchar rewind setbuf setlinebuf vasprintf \
42 iovdprintf vscanf vsnprintf obprintf fcloseall fseeko ftello \
43 freopen64 fseeko64 ftello64 \
45 __fbufsize __freading __fwriting __freadable __fwritable __flbf \
46 __fpurge __fpending __fsetlocking \
48 libc_fatal fmemopen
50 tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \
51 tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-fopenloc \
52 tst-fgetws tst-ungetwc1 tst-ungetwc2 tst-swscanf tst-sscanf \
53 tst-mmap-setvbuf bug-ungetwc1 bug-ungetwc2 tst-atime tst-eof \
54 tst-freopen bug-rewind bug-rewind2 bug-ungetc bug-fseek \
55 tst-mmap-eofsync tst-mmap-fflushsync bug-mmap-fflush \
56 tst-mmap2-eofsync tst-mmap-offend bug-fopena+ bug-wfflush \
57 bug-ungetc2 bug-ftell bug-ungetc3 bug-ungetc4 tst-fopenloc2 \
58 tst-memstream1 tst-memstream2 \
59 tst-wmemstream1 tst-wmemstream2
60 test-srcs = test-freopen
62 all: # Make this the default target; it will be defined in Rules.
64 include ../Makeconfig
66 ifeq ($(versioning),yes)
67 routines += oldiofopen oldiofdopen oldiofclose oldiopopen oldpclose \
68 oldtmpfile oldiofgetpos oldiofgetpos64 oldiofsetpos \
69 oldiofsetpos64
70 endif
72 ifneq (,$(filter %REENTRANT, $(defines)))
73 routines += clearerr_u feof_u ferror_u fputc_u getc_u getchar_u \
74 iofflush_u putc_u putchar_u peekc iofread_u iofwrite_u iofgets_u \
75 iofputs_u
77 CPPFLAGS += -D_IO_MTSAFE_IO
78 endif
80 # Support for exception handling.
81 CFLAGS-fileops.c = $(exceptions)
82 CFLAGS-fputc.c = $(exceptions)
83 CFLAGS-fputwc.c = $(exceptions)
84 CFLAGS-freopen64.c = $(exceptions)
85 CFLAGS-freopen.c = $(exceptions)
86 CFLAGS-fseek.c = $(exceptions)
87 CFLAGS-fseeko64.c = $(exceptions)
88 CFLAGS-fseeko.c = $(exceptions)
89 CFLAGS-ftello64.c = $(exceptions)
90 CFLAGS-ftello.c = $(exceptions)
91 CFLAGS-fwide.c = $(exceptions)
92 CFLAGS-genops.c = $(exceptions)
93 CFLAGS-getc.c = $(exceptions)
94 CFLAGS-getchar.c = $(exceptions)
95 CFLAGS-getwc.c = $(exceptions)
96 CFLAGS-getwchar.c = $(exceptions)
97 CFLAGS-iofclose.c = $(exceptions)
98 CFLAGS-iofflush.c = $(exceptions)
99 CFLAGS-iofgetpos64.c = $(exceptions)
100 CFLAGS-iofgetpos.c = $(exceptions)
101 CFLAGS-iofgets.c = $(exceptions)
102 CFLAGS-iofgetws.c = $(exceptions)
103 CFLAGS-iofputs.c = $(exceptions)
104 CFLAGS-iofputws.c = $(exceptions)
105 CFLAGS-iofread.c = $(exceptions)
106 CFLAGS-iofsetpos64.c = $(exceptions)
107 CFLAGS-iofsetpos.c = $(exceptions)
108 CFLAGS-ioftell.c = $(exceptions)
109 CFLAGS-iofwrite.c = $(exceptions)
110 CFLAGS-iogetdelim.c = $(exceptions)
111 CFLAGS-iogetline.c = $(exceptions)
112 CFLAGS-iogets.c = $(exceptions)
113 CFLAGS-iogetwline.c = $(exceptions)
114 CFLAGS-ioputs.c = $(exceptions)
115 CFLAGS-ioseekoff.c = $(exceptions)
116 CFLAGS-ioseekpos.c = $(exceptions)
117 CFLAGS-iosetbuffer.c = $(exceptions)
118 CFLAGS-iosetvbuf.c = $(exceptions)
119 CFLAGS-ioungetc.c = $(exceptions)
120 CFLAGS-ioungetwc.c = $(exceptions)
121 CFLAGS-oldfileops.c = $(exceptions)
122 CFLAGS-oldiofclose.c = $(exceptions)
123 CFLAGS-oldiofgetpos64.c = $(exceptions)
124 CFLAGS-oldiofgetpos.c = $(exceptions)
125 CFLAGS-oldiofsetpos64.c = $(exceptions)
126 CFLAGS-oldiofsetpos.c = $(exceptions)
127 CFLAGS-peekc.c = $(exceptions)
128 CFLAGS-putc.c = $(exceptions)
129 CFLAGS-putchar.c = $(exceptions)
130 CFLAGS-putwc.c = $(exceptions)
131 CFLAGS-putwchar.c = $(exceptions)
132 CFLAGS-rewind.c = $(exceptions)
133 CFLAGS-wfileops.c = $(exceptions)
134 CFLAGS-wgenops.c = $(exceptions)
135 CFLAGS-oldiofopen.c = $(exceptions)
136 CFLAGS-iofopen.c = $(exceptions)
137 CFLAGS-iofopen64.c = $(exceptions)
138 CFLAGS-oldtmpfile.c = $(exceptions)
139 # XXX Do we need filedoalloc and wfiledoalloc? Others?
141 CFLAGS-tst_putwc.c = -DOBJPFX=\"$(objpfx)\"
143 tst_wprintf2-ARGS = "Some Text"
145 tst-widetext-ENV = LOCPATH=$(common-objpfx)localedata LANGUAGE=C
146 tst-fopenloc-ENV = LOCPATH=$(common-objpfx)localedata \
147 MALLOC_TRACE=$(objpfx)tst-fopenloc.mtrace
148 tst-fgetws-ENV = LOCPATH=$(common-objpfx)localedata
149 tst-ungetwc1-ENV = LOCPATH=$(common-objpfx)localedata
150 tst-ungetwc2-ENV = LOCPATH=$(common-objpfx)localedata
151 bug-ungetwc2-ENV = LOCPATH=$(common-objpfx)localedata
152 tst-swscanf-ENV = LOCPATH=$(common-objpfx)localedata
153 bug-ftell-ENV = LOCPATH=$(common-objpfx)localedata
155 generated = tst-fopenloc.mtrace tst-fopenloc.check
157 aux := fileops genops stdfiles stdio strops
159 ifeq ($(versioning),yes)
160 aux += oldfileops oldstdfiles
161 endif
163 shared-only-routines = oldiofopen oldiofdopen oldiofclose oldfileops \
164 oldstdfiles oldiopopen oldpclose oldtmpfile \
165 oldiofgetpos oldiofgetpos64 oldiofsetpos \
166 oldiofsetpos64
168 distribute := iolibio.h libioP.h strfile.h Banner test-freopen.sh \
169 fd_to_filename.h
171 include ../Rules
173 ifeq (no,$(cross-compiling))
174 tests: $(objpfx)test-freopen.out $(objpfx)tst-fopenloc.check
175 endif
177 $(objpfx)test-freopen.out: test-freopen.sh $(objpfx)test-freopen
178 $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' \
179 $(common-objpfx)libio/
181 $(objpfx)tst-fopenloc.check: $(objpfx)tst-fopenloc.out
182 cmp ../iconvdata/testdata/ISO-8859-1..UTF8 $(objpfx)tst-fopenloc.out \
183 > $@
184 $(common-objpfx)malloc/mtrace $(objpfx)tst-fopenloc.mtrace >> $@