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# 35picolibc_sources( 36 asprintf.c 37 atold_engine.c 38 bufio.c 39 clearerr.c 40 dtox_engine.c 41 ecvt.c 42 ecvtf.c 43 ecvtf_r.c 44 ecvtl.c 45 ecvtl_r.c 46 ecvt_r.c 47 fclose.c 48 fcvt.c 49 fcvtf.c 50 fcvtf_r.c 51 fcvtl.c 52 fcvtl_r.c 53 fcvt_r.c 54 fdevopen.c 55 feof.c 56 ferror.c 57 fflush.c 58 fgetc.c 59 fgets.c 60 fgetwc.c 61 fgetws.c 62 fileno.c 63 filestrget.c 64 filestrputalloc.c 65 filestrput.c 66 filewstrget.c 67 flockfile.c 68 fmemopen.c 69 fprintf.c 70 fputc.c 71 fputs.c 72 fputwc.c 73 fputws.c 74 fread.c 75 fscanf.c 76 fseek.c 77 fseeko.c 78 ftell.c 79 ftello.c 80 ftox_engine.c 81 ftrylockfile.c 82 funlockfile.c 83 funopen.c 84 fwide.c 85 fwprintf.c 86 fwrite.c 87 fwscanf.c 88 gcvt.c 89 gcvtf.c 90 gcvtl.c 91 getchar.c 92 getdelim.c 93 getline.c 94 gets.c 95 getwchar.c 96 ldtoa_engine.c 97 ldtox_engine.c 98 matchcaseprefix.c 99 mktemp.c 100 perror.c 101 printf.c 102 putchar.c 103 puts.c 104 putwchar.c 105 remove.c 106 rewind.c 107 scanf.c 108 setbuf.c 109 setbuffer.c 110 setlinebuf.c 111 setvbuf.c 112 sflags.c 113 snprintf.c 114 snprintfd.c 115 snprintff.c 116 sprintf.c 117 sprintfd.c 118 sprintff.c 119 sscanf.c 120 strfromd.c 121 strfromf.c 122 strfroml.c 123 strtod.c 124 strtod_l.c 125 strtof.c 126 strtof_l.c 127 strtoimax.c 128 strtol.c 129 strtold.c 130 strtold_l.c 131 strtol_l.c 132 strtoll.c 133 strtoll_l.c 134 strtoul.c 135 strtoul_l.c 136 strtoull.c 137 strtoull_l.c 138 strtoumax.c 139 swprintf.c 140 swscanf.c 141 tmpfile.c 142 tmpnam.c 143 ungetc.c 144 ungetwc.c 145 vasprintf.c 146 vffprintf.c 147 vffscanf.c 148 vfiprintf.c 149 vfiscanf.c 150 vflprintf.c 151 vflscanf.c 152 vfmprintf.c 153 vfmscanf.c 154 vfprintf.c 155 vfscanf.c 156 vfwprintf.c 157 vfwscanf.c 158 vprintf.c 159 vscanf.c 160 vsnprintf.c 161 vsprintf.c 162 vsscanf.c 163 vswprintf.c 164 vswscanf.c 165 vwprintf.c 166 vwscanf.c 167 wprintf.c 168 wscanf.c 169 sprintf_s.c 170 ) 171 172picolibc_sources( 173 compare_exchange.c 174 exchange.c 175 ) 176 177picolibc_sources( 178 fdopen.c 179 fopen.c 180 freopen.c 181 ) 182 183if(_IO_FLOAT_EXACT) 184 picolibc_sources( 185 atod_ryu.c 186 atof_ryu.c 187 dtoa_ryu.c 188 ftoa_ryu.c 189 ryu_divpow2.c 190 ryu_log10.c 191 ryu_log2pow5.c 192 ryu_pow5bits.c 193 ryu_table.c 194 ryu_umul128.c 195 ) 196else() 197 picolibc_sources( 198 atod_engine.c 199 atof_engine.c 200 dtoa_engine.c 201 ftoa_engine.c 202 ) 203endif() 204 205if(POSIX_CONSOLE) 206 picolibc_sources( 207 posixiob_stdin.c 208 posixiob_stdout.c 209 posixiob_stderr.c 210 ) 211endif() 212 213picolibc_headers("" 214 stdio.h 215 stdio-bufio.h 216 ) 217