1#
2# SPDX-License-Identifier: BSD-3-Clause
3#
4# Copyright © 2022 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#
35target_include_directories(c PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")
36
37picolibc_sources(
38  signgam.c
39  s_finite.c
40  s_copysign.c
41  s_modf.c
42  s_scalbn.c
43  s_cbrt.c
44  s_exp10.c
45  s_expm1.c
46  s_ilogb.c
47  s_infinity.c
48  s_iseqsig.c
49  s_isinf.c
50  s_isinfd.c
51  s_isnan.c
52  s_isnand.c
53  s_issignaling.c
54  s_log1p.c
55  s_nan.c
56  s_nextafter.c
57  s_pow10.c
58  s_rint.c
59  s_logb.c
60  s_log2.c
61  s_fdim.c
62  s_fma.c
63  s_fmax.c
64  s_fmin.c
65  s_fpclassify.c
66  s_getpayload.c
67  s_lrint.c
68  s_llrint.c
69  s_lround.c
70  s_llround.c
71  s_nearbyint.c
72  s_remquo.c
73  s_round.c
74  s_scalbln.c
75  s_signbit.c
76  s_trunc.c
77  exp_data.c
78  math_err_with_errno.c
79  math_err_uflow.c
80  math_err_oflow.c
81  math_err_divzero.c
82  math_err_invalid.c
83  math_err_may_uflow.c
84  math_err_check_uflow.c
85  math_err_check_oflow.c
86  math_inexact.c
87  math_inexactf.c
88  log_data.c
89  log2_data.c
90  pow.c
91  pow_log_data.c
92  sf_finite.c
93  sf_copysign.c
94  sf_modf.c
95  sf_scalbn.c
96  sf_cbrt.c
97  sf_exp10.c
98  sf_expm1.c
99  sf_getpayload.c
100  sf_ilogb.c
101  sf_infinity.c
102  sf_iseqsig.c
103  sf_isinf.c
104  sf_isinff.c
105  sf_isnan.c
106  sf_isnanf.c
107  sf_issignaling.c
108  sf_log1p.c
109  sf_nan.c
110  sf_nextafter.c
111  sf_pow10.c
112  sf_rint.c
113  sf_logb.c
114  sf_fdim.c
115  sf_fma.c
116  sf_fmax.c
117  sf_fmin.c
118  sf_fpclassify.c
119  sf_lrint.c
120  sf_llrint.c
121  sf_lround.c
122  sf_llround.c
123  sf_nearbyint.c
124  sf_remquo.c
125  sf_round.c
126  sf_scalbln.c
127  sf_trunc.c
128  sf_exp2_data.c
129  sf_log_data.c
130  sf_log2_data.c
131  sf_pow_log2_data.c
132  sinf.c
133  sincosf.c
134  sincosf_data.c
135  math_errf_with_errnof.c
136  math_errf_uflowf.c
137  math_errf_may_uflowf.c
138  math_errf_oflowf.c
139  math_errf_divzerof.c
140  math_errf_invalidf.c
141  math_errf_check_oflowf.c
142  math_errf_check_uflowf.c
143)
144
145if(_HAVE_LONG_DOUBLE)
146  picolibc_sources(
147    copysignl.c
148    frexpl.c
149    exp10l.c
150    fabsl.c
151    frexpl.c
152    isinfl.c
153    isnanl.c
154    math_inexactl.c
155    nanl.c
156    nexttoward.c
157    nexttowardf.c
158    sl_iseqsig.c
159    sl_issignaling.c
160  )
161endif()
162