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#
35dsrc_complex = [
36  'cabs.c',
37  'cacos.c',
38  'cacosh.c',
39  'carg.c',
40  'casin.c',
41  'casinh.c',
42  'catan.c',
43  'catanh.c',
44  'ccos.c',
45  'ccosh.c',
46  'cephes_subr.c',
47  'cexp.c',
48  'cimag.c',
49  'clog.c',
50  'clog10.c',
51  'conj.c',
52  'cpow.c',
53  'cproj.c',
54  'creal.c',
55  'csin.c',
56  'csinh.c',
57  'csqrt.c',
58  'ctan.c',
59  'ctanh.c',
60]
61
62fsrc_complex = [
63  'cabsf.c',
64  'casinf.c',
65  'ccosf.c',
66  'cimagf.c',
67  'cprojf.c',
68  'csqrtf.c',
69  'cacosf.c',
70  'casinhf.c',
71  'ccoshf.c',
72  'clogf.c',
73  'clog10f.c',
74  'crealf.c',
75  'ctanf.c',
76  'cacoshf.c',
77  'catanf.c',
78  'cephes_subrf.c',
79  'conjf.c',
80  'csinf.c',
81  'ctanhf.c',
82  'cargf.c',
83  'catanhf.c',
84  'cexpf.c',
85  'cpowf.c',
86  'csinhf.c',
87]
88
89lsrc_complex = [
90  'cabsl.c',
91  'creall.c',
92  'cimagl.c',
93  'conjl.c',
94  'cprojl.c',
95  'csqrtl.c',
96]
97
98lsrc_complex_long_double_equal_double = [
99  'cacoshl.c',
100  'cacosl.c',
101  'cargl.c',
102  'casinhl.c',
103  'casinl.c',
104  'catanhl.c',
105  'catanl.c',
106  'cephes_subrl.c',
107  'ccoshl.c',
108  'ccosl.c',
109  'cexpl.c',
110  'clog10l.c',
111  'clogl.c',
112  'cpowl.c',
113  'csinhl.c',
114  'csinl.c',
115  'ctanhl.c',
116  'ctanl.c',
117]
118
119srcs_complex = dsrc_complex + fsrc_complex
120
121if have_long_double
122  lsrc_complex += lsrc_complex_long_double_equal_double
123  srcs_complex += lsrc_complex
124endif
125
126hdrs_complex = [
127    'cephes_subrf.h',
128    'cephes_subr.h',
129    'cephes_subrl.h',
130]
131
132src_libm_complex = files(srcs_complex)
133