1#
2# SPDX-License-Identifier: BSD-3-Clause
3#
4# Copyright © 2019 Keith Packard
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:
9#
10# 1. Redistributions of source code must retain the above copyright
11#    notice, this list of conditions and the following disclaimer.
12#
13# 2. Redistributions in binary form must reproduce the above
14#    copyright notice, this list of conditions and the following
15#    disclaimer in the documentation and/or other materials provided
16#    with the distribution.
17#
18# 3. Neither the name of the copyright holder nor the names of its
19#    contributors may be used to endorse or promote products derived
20#    from this software without specific prior written permission.
21#
22# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
27# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
29# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
31# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
33# OF THE POSSIBILITY OF SUCH DAMAGE.
34#
35subdir('iconv_data')
36
37srcs_iconv_ccs = [
38    'big5.c',
39    'ccsbi.c',
40    'cns11643_plane14.c',
41    'cns11643_plane1.c',
42    'cns11643_plane2.c',
43    'cp775.c',
44    'cp850.c',
45    'cp852.c',
46    'cp855.c',
47    'cp866.c',
48    'iso_8859_10.c',
49    'iso_8859_11.c',
50    'iso_8859_13.c',
51    'iso_8859_14.c',
52    'iso_8859_15.c',
53    'iso_8859_1.c',
54    'iso_8859_2.c',
55    'iso_8859_3.c',
56    'iso_8859_4.c',
57    'iso_8859_5.c',
58    'iso_8859_6.c',
59    'iso_8859_7.c',
60    'iso_8859_8.c',
61    'iso_8859_9.c',
62    'iso_ir_111.c',
63    'jis_x0201_1976.c',
64    'jis_x0208_1990.c',
65    'jis_x0212_1990.c',
66    'koi8_r.c',
67    'koi8_ru.c',
68    'koi8_u.c',
69    'koi8_uni.c',
70    'ksx1001.c',
71    'win_1250.c',
72    'win_1251.c',
73    'win_1252.c',
74    'win_1253.c',
75    'win_1254.c',
76    'win_1255.c',
77    'win_1256.c',
78    'win_1257.c',
79    'win_1258.c',
80]
81hdrs_iconv_ccs = [
82    'ccsbi.h',
83    'ccs.h',
84    'ccsnames.h',
85]
86
87newlib_iconv_ccs_dir=meson.current_source_dir()
88
89srcs_iconv_ccs_use = []
90foreach file : srcs_iconv_ccs
91  s_file = fs.replace_suffix(file, '.S')
92  if file in srcs_machine
93    message('libc/iconv/ccs/' + file + ': machine overrides generic')
94  elif s_file in srcs_machine
95    message('libc/iconv/ccs/' + s_file + ': machine overrides generic')
96  else
97    srcs_iconv_ccs_use += file
98  endif
99endforeach
100
101src_iconv_ccs = files(srcs_iconv_ccs_use)
102
103