Hurd-specific kernel-features.h.
[glibc.git] / stdio-common / Makefile
blobd5b1251993c992b2c47cf3f7891dedf90eb8ebc6
1 # Copyright (C) 1991-2006, 2007 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 stdio-common.
22 subdir := stdio-common
24 headers := stdio_ext.h printf.h bits/printf-ldbl.h
26 routines := \
27 ctermid cuserid \
28 _itoa _itowa itoa-digits itoa-udigits itowa-digits \
29 vfprintf vprintf printf_fp reg-printf printf-prs printf_fphex \
30 printf_size fprintf printf snprintf sprintf asprintf dprintf \
31 vfwprintf vfscanf vfwscanf \
32 fscanf scanf sscanf \
33 perror psignal \
34 tmpfile tmpfile64 tmpnam tmpnam_r tempnam tempname \
35 getline getw putw \
36 remove rename renameat \
37 flockfile ftrylockfile funlockfile \
38 isoc99_scanf isoc99_vscanf isoc99_fscanf isoc99_vfscanf isoc99_sscanf \
39 isoc99_vsscanf
41 install-others = $(inst_includedir)/bits/stdio_lim.h
43 include ../Makeconfig
45 aux := errlist siglist printf-parsemb printf-parsewc fxprintf
46 distribute := _itoa.h _itowa.h _i18n_number.h \
47 printf-parse.h stdio_lim.h.in tst-unbputc.sh tst-printf.sh
49 tests := tstscanf test_rdwr test-popen tstgetln test-fseek \
50 temptest tst-fileno test-fwrite tst-ungetc tst-ferror \
51 xbug errnobug \
52 bug1 bug2 bug3 bug4 bug5 bug6 bug7 bug8 bug9 bug10 bug11 bug12 bug13 \
53 tfformat tiformat tllformat tstdiomisc tst-printfsz tst-wc-printf \
54 scanf1 scanf2 scanf3 scanf4 scanf5 scanf7 scanf8 scanf9 scanf10 \
55 scanf11 scanf12 tst-tmpnam tst-cookie tst-obprintf tst-sscanf \
56 tst-swprintf tst-fseek tst-fmemopen test-vfprintf tst-gets \
57 tst-perror tst-sprintf tst-rndseek tst-fdopen tst-fphex bug14 bug15 \
58 tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \
59 tst-fwrite bug16 bug17 tst-swscanf tst-sprintf2 bug18 bug18a \
60 bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20
62 test-srcs = tst-unbputc tst-printf
64 include ../Rules
66 $(inst_includedir)/bits/stdio_lim.h: $(common-objpfx)bits/stdio_lim.h $(+force)
67 $(do-install)
69 ifeq ($(cross-compiling),no)
70 .PHONY: do-tst-unbputc do-tst-printf
71 tests: do-tst-unbputc do-tst-printf
73 do-tst-unbputc: $(objpfx)tst-unbputc.out
74 $(objpfx)tst-unbputc.out: $(objpfx)tst-unbputc tst-unbputc.sh
75 $(SHELL) -e tst-unbputc.sh $(common-objpfx) '$(run-program-prefix)'
77 do-tst-printf: $(objpfx)tst-printf.out
78 $(objpfx)tst-printf.out: $(objpfx)tst-printf tst-printf.sh
79 $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)'
80 endif
82 CFLAGS-vfprintf.c = -Wno-uninitialized
83 CFLAGS-vfwprintf.c = -Wno-uninitialized
84 CFLAGS-tst-printf.c = -Wno-format
85 CFLAGS-tstdiomisc.c = -Wno-format
86 CFLAGS-scanf4.c = -Wno-format
87 CFLAGS-scanf7.c = -Wno-format
88 CFLAGS-tst-printfsz.c = -Wno-format
90 CFLAGS-tmpfile.c = -fexceptions
91 CFLAGS-tmpfile64.c = -fexceptions
92 CFLAGS-tempname.c = -fexceptions
93 CFLAGS-psignal.c = -fexceptions
94 CFLAGS-vprintf.c = -fexceptions
95 CFLAGS-cuserid.c = -fexceptions
97 CFLAGS-vfprintf.c += $(exceptions)
98 CFLAGS-fprintf.c += $(exceptions)
99 CFLAGS-printf.c += $(exceptions)
100 CFLAGS-vfwprintf.c += $(exceptions)
101 CFLAGS-vfscanf.c += $(exceptions)
102 CFLAGS-vfwscanf.c += $(exceptions)
103 CFLAGS-fscanf.c += $(exceptions)
104 CFLAGS-scanf.c += $(exceptions)
105 CFLAGS-isoc99_vfscanf.c += $(exceptions)
106 CFLAGS-isoc99_vscanf.c += $(exceptions)
107 CFLAGS-isoc99_fscanf.c += $(exceptions)
108 CFLAGS-isoc99_scanf.c += $(exceptions)
109 CFLAGS-errlist.c = $(fno-unit-at-a-time)
110 CFLAGS-siglist.c = $(fno-unit-at-a-time)
112 # The following is a hack since we must compile scanf15.c without any
113 # GNU extension. The latter are needed, though, when internal headers
114 # are used. So made sure we see the installed headers first.
115 CFLAGS-scanf15.c = -I../libio -I../stdlib -I../wcsmbs -I../time -I../string \
116 -I../wctype
118 # We know the test has a format string problem.
119 CFLAGS-tst-sprintf.c = -Wno-format
120 tst-sscanf-ENV = LOCPATH=$(common-objpfx)localedata
121 tst-swprintf-ENV = LOCPATH=$(common-objpfx)localedata
122 test-vfprintf-ENV = LOCPATH=$(common-objpfx)localedata
123 scanf13-ENV = LOCPATH=$(common-objpfx)localedata
124 bug14-ENV = LOCPATH=$(common-objpfx)localedata
125 bug15-ENV = LOCPATH=$(common-objpfx)localedata
127 ifneq (,$(filter %REENTRANT, $(defines)))
128 CPPFLAGS += -D_IO_MTSAFE_IO
129 endif