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 bufio.c 38 clearerr.c 39 compare_exchange.c 40 ecvt_r.c 41 ecvt.c 42 ecvtf_r.c 43 ecvtf.c 44 exchange.c 45 fcvt.c 46 fcvt_r.c 47 fcvtf.c 48 fcvtf_r.c 49 gcvt.c 50 gcvtf.c 51 fclose.c 52 fdevopen.c 53 feof.c 54 ferror.c 55 fflush.c 56 fgetc.c 57 fgets.c 58 fgetwc.c 59 fgetws.c 60 fileno.c 61 filestrget.c 62 filestrput.c 63 filestrputalloc.c 64 filewstrget.c 65 fmemopen.c 66 fprintf.c 67 fputc.c 68 fputs.c 69 fputwc.c 70 fputws.c 71 fread.c 72 freopen.c 73 fscanf.c 74 fseek.c 75 fseeko.c 76 ftell.c 77 ftello.c 78 fwide.c 79 fwrite.c 80 fwprintf.c 81 fwscanf.c 82 getchar.c 83 getdelim.c 84 getline.c 85 gets.c 86 getwchar.c 87 matchcaseprefix.c 88 mktemp.c 89 perror.c 90 printf.c 91 putchar.c 92 puts.c 93 putwchar.c 94 remove.c 95 rewind.c 96 scanf.c 97 setbuf.c 98 setbuffer.c 99 setlinebuf.c 100 setvbuf.c 101 snprintf.c 102 sprintf.c 103 snprintfd.c 104 snprintff.c 105 sprintff.c 106 sprintfd.c 107 sscanf.c 108 strfromf.c 109 strfromd.c 110 strtof.c 111 strtof_l.c 112 strtod.c 113 strtod_l.c 114 strtoimax.c 115 strtol.c 116 strtoll.c 117 strtoul.c 118 strtoull.c 119 strtoumax.c 120 swprintf.c 121 swscanf.c 122 tmpnam.c 123 tmpfile.c 124 ungetc.c 125 ungetwc.c 126 vasprintf.c 127 vfiprintf.c 128 vfprintf.c 129 vfprintff.c 130 vfscanf.c 131 vfiscanf.c 132 vfscanff.c 133 vfwprintf.c 134 vfwscanf.c 135 vprintf.c 136 vscanf.c 137 vsscanf.c 138 vsnprintf.c 139 vsprintf.c 140 vswprintf.c 141 vswscanf.c 142 wprintf.c 143 wscanf.c 144 fopen.c 145 fdopen.c 146 fclose.c 147 sflags.c 148 ) 149 150if(_IO_FLOAT_EXACT) 151 picolibc_sources( 152 dtoa_ryu.c 153 ftoa_ryu.c 154 ryu_table.c 155 atod_ryu.c 156 atof_ryu.c 157 ryu_log2pow5.c 158 ryu_log10.c 159 ryu_pow5bits.c 160 ryu_umul128.c 161 ryu_divpow2.c 162 ) 163else() 164 picolibc_sources( 165 dtoa_engine.c 166 ftoa_engine.c 167 atod_engine.c 168 atof_engine.c 169 ) 170endif() 171 172if(POSIX_CONSOLE) 173 picolibc_sources( 174 posixiob.c 175 ) 176endif() 177 178picolibc_headers("" 179 stdio.h 180 stdio-bufio.h 181 ) 182