Require binutils 2.24 to build x86-64 glibc [BZ #20139]
[glibc.git] / wcsmbs / Makefile
blob8b599f75be3cc75d29b34d4d959ba6c3dd10107d
1 # Copyright (C) 1995-2016 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, see
16 # <http://www.gnu.org/licenses/>.
19 # Sub-makefile for wcsmbs portion of the library.
21 subdir := wcsmbs
23 include ../Makeconfig
25 headers := wchar.h bits/wchar.h bits/wchar2.h bits/wchar-ldbl.h uchar.h
27 routines := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \
28 wcsncmp wcsncpy wcspbrk wcsrchr wcsspn wcstok wcsstr wmemchr \
29 wmemcmp wmemcpy wmemmove wmemset wcpcpy wcpncpy wmempcpy \
30 btowc wctob mbsinit \
31 mbrlen mbrtowc wcrtomb mbsrtowcs wcsrtombs \
32 mbsnrtowcs wcsnrtombs wcsnlen wcschrnul \
33 wcstol wcstoul wcstoll wcstoull wcstod wcstold wcstof \
34 wcstol_l wcstoul_l wcstoll_l wcstoull_l \
35 wcstod_l wcstold_l wcstof_l \
36 wcstod_nan wcstold_nan wcstof_nan \
37 wcscoll wcsxfrm \
38 wcwidth wcswidth \
39 wcscoll_l wcsxfrm_l \
40 wcscasecmp wcsncase wcscasecmp_l wcsncase_l \
41 wcsmbsload mbsrtowcs_l \
42 isoc99_wscanf isoc99_vwscanf isoc99_fwscanf isoc99_vfwscanf \
43 isoc99_swscanf isoc99_vswscanf \
44 mbrtoc16 c16rtomb
46 strop-tests := wcscmp wcsncmp wmemcmp wcslen wcschr wcsrchr wcscpy wcsnlen \
47 wcpcpy wcsncpy wcpncpy wcscat wcsncat wcschrnul wcsspn wcspbrk \
48 wcscspn wmemchr wmemset
49 tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \
50 tst-wcrtomb tst-wcpncpy tst-mbsrtowcs tst-wchar-h tst-mbrtowc2 \
51 tst-c16c32-1 wcsatcliff tst-wcstol-locale tst-wcstod-nan-locale \
52 $(addprefix test-,$(strop-tests))
54 include ../Rules
56 ifeq ($(run-built-tests),yes)
57 LOCALES := de_DE.ISO-8859-1 de_DE.UTF-8 en_US.ANSI_X3.4-1968 hr_HR.ISO-8859-2 \
58 ja_JP.EUC-JP zh_TW.EUC-TW tr_TR.UTF-8 tr_TR.ISO-8859-9
59 include ../gen-locales.mk
61 $(objpfx)tst-btowc.out: $(gen-locales)
62 $(objpfx)tst-c16c32-1.out: $(gen-locales)
63 $(objpfx)tst-mbrtowc.out: $(gen-locales)
64 $(objpfx)tst-mbrtowc2.out: $(gen-locales)
65 $(objpfx)tst-wcrtomb.out: $(gen-locales)
66 $(objpfx)wcsmbs-tst1.out: $(gen-locales)
67 $(objpfx)tst-wcstol-locale.out: $(gen-locales)
68 $(objpfx)tst-wcstod-nan-locale.out: $(gen-locales)
69 endif
71 CFLAGS-wcwidth.c = -I../wctype
72 CFLAGS-wcswidth.c = -I../wctype
74 strtox-CFLAGS = -I../include
75 CFLAGS-wcstol.c = $(strtox-CFLAGS)
76 CFLAGS-wcstoul.c = $(strtox-CFLAGS)
77 CFLAGS-wcstoll.c = $(strtox-CFLAGS)
78 CFLAGS-wcstoull.c = $(strtox-CFLAGS)
79 CFLAGS-wcstod.c = $(strtox-CFLAGS)
80 CFLAGS-wcstold.c = $(strtox-CFLAGS)
81 CFLAGS-wcstof.c = $(strtox-CFLAGS)
82 CFLAGS-wcstol_l.c = $(strtox-CFLAGS)
83 CFLAGS-wcstoul_l.c = $(strtox-CFLAGS)
84 CFLAGS-wcstoll_l.c = $(strtox-CFLAGS)
85 CFLAGS-wcstoull_l.c = $(strtox-CFLAGS)
86 CFLAGS-wcstod_l.c = $(strtox-CFLAGS)
87 CFLAGS-wcstold_l.c = $(strtox-CFLAGS)
88 CFLAGS-wcstof_l.c = $(strtox-CFLAGS)
89 CPPFLAGS-tst-wchar-h.c = -D_FORTIFY_SOURCE=2
91 CFLAGS-isoc99_wscanf.c += -fexceptions
92 CFLAGS-isoc99_fwscanf.c += -fexceptions
93 CFLAGS-isoc99_vwscanf.c += -fexceptions
94 CFLAGS-isoc99_vfwscanf.c += -fexceptions
96 CPPFLAGS += $(libio-mtsafe)
98 # We need to find the default version of strtold_l in stdlib.
99 CPPFLAGS-wcstold_l.c = -I../stdlib
101 $(objpfx)tst-wcstod-nan-locale: $(libm)