blob: 44a4494403f201c97be595fcc75ec2197832569f [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001# Copyright (C) 1995-2015 Free Software Foundation, Inc.
2# This file is part of the GNU C Library.
3
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.
8
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.
13
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/>.
17
18#
19# Sub-makefile for wcsmbs portion of the library.
20#
21subdir := wcsmbs
22
23include ../Makeconfig
24
25headers := wchar.h bits/wchar.h bits/wchar2.h bits/wchar-ldbl.h uchar.h
26
27routines := 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 wcscoll wcsxfrm \
37 wcwidth wcswidth \
38 wcscoll_l wcsxfrm_l \
39 wcscasecmp wcsncase wcscasecmp_l wcsncase_l \
40 wcsmbsload mbsrtowcs_l \
41 isoc99_wscanf isoc99_vwscanf isoc99_fwscanf isoc99_vfwscanf \
42 isoc99_swscanf isoc99_vswscanf \
43 mbrtoc16 c16rtomb
44
45strop-tests := wcscmp wcsncmp wmemcmp wcslen wcschr wcsrchr wcscpy
46tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \
47 tst-wcrtomb tst-wcpncpy tst-mbsrtowcs tst-wchar-h tst-mbrtowc2 \
48 tst-c16c32-1 wcsatcliff $(addprefix test-,$(strop-tests))
49
50include ../Rules
51
52CFLAGS-wcwidth.c = -I../wctype
53CFLAGS-wcswidth.c = -I../wctype
54
55strtox-CFLAGS = -I../include
56CFLAGS-wcstol.c = $(strtox-CFLAGS)
57CFLAGS-wcstoul.c = $(strtox-CFLAGS)
58CFLAGS-wcstoll.c = $(strtox-CFLAGS)
59CFLAGS-wcstoull.c = $(strtox-CFLAGS)
60CFLAGS-wcstod.c = $(strtox-CFLAGS)
61CFLAGS-wcstold.c = $(strtox-CFLAGS)
62CFLAGS-wcstof.c = $(strtox-CFLAGS)
63CFLAGS-wcstol_l.c = $(strtox-CFLAGS)
64CFLAGS-wcstoul_l.c = $(strtox-CFLAGS)
65CFLAGS-wcstoll_l.c = $(strtox-CFLAGS)
66CFLAGS-wcstoull_l.c = $(strtox-CFLAGS)
67CFLAGS-wcstod_l.c = $(strtox-CFLAGS)
68CFLAGS-wcstold_l.c = $(strtox-CFLAGS)
69CFLAGS-wcstof_l.c = $(strtox-CFLAGS)
70CPPFLAGS-tst-wchar-h.c = -D_FORTIFY_SOURCE=2
71
72CFLAGS-isoc99_wscanf.c += $(exceptions)
73CFLAGS-isoc99_fwscanf.c += $(exceptions)
74CFLAGS-isoc99_vwscanf.c += $(exceptions)
75CFLAGS-isoc99_vfwscanf.c += $(exceptions)
76
77CPPFLAGS += $(libio-mtsafe)
78
79# We need to find the default version of strtold_l in stdlib.
80CPPFLAGS-wcstold_l.c = -I../stdlib