1# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved. 2# Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without modification, 5# are permitted provided that the following conditions are met: 6# 7# 1. Redistributions of source code must retain the above copyright notice, this list of 8# conditions and the following disclaimer. 9# 10# 2. Redistributions in binary form must reproduce the above copyright notice, this list 11# of conditions and the following disclaimer in the documentation and/or other materials 12# provided with the distribution. 13# 14# 3. Neither the name of the copyright holder nor the names of its contributors may be used 15# to endorse or promote products derived from this software without specific prior written 16# permission. 17# 18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 20# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 22# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 23# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 25# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 26# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 27# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 28# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 30libc = "musl-c" 31libm = "musl-m" 32 33config("include") { 34 include_dirs = [ "include" ] 35} 36 37static_library(libc) { 38 sources = [ 39 "src/ctype/__ctype_get_mb_cur_max.c", 40 "src/ctype/isalnum.c", 41 "src/ctype/isascii.c", 42 "src/ctype/isdigit.c", 43 "src/ctype/islower.c", 44 "src/ctype/isprint.c", 45 "src/ctype/isspace.c", 46 "src/ctype/isupper.c", 47 "src/ctype/isxdigit.c", 48 "src/ctype/tolower.c", 49 "src/ctype/toupper.c", 50 "src/errno/strerror.c", 51 "src/exit/abort.c", 52 "src/exit/assert.c", 53 "src/exit/atexit.c", 54 "src/internal/floatscan.c", 55 "src/internal/intscan.c", 56 "src/internal/shgetc.c", 57 "src/locale/__lctrans.c", 58 "src/locale/c_locale.c", 59 "src/locale/langinfo.c", 60 "src/misc/dirname.c", 61 "src/multibyte/internal.c", 62 "src/multibyte/mbtowc.c", 63 "src/multibyte/wcrtomb.c", 64 "src/multibyte/wctomb.c", 65 "src/network/h_errno.c", 66 "src/network/htonl.c", 67 "src/network/htons.c", 68 "src/network/ntohl.c", 69 "src/network/ntohs.c", 70 "src/prng/rand.c", 71 "src/prng/random.c", 72 "src/regex/regcomp.c", 73 "src/regex/regexec.c", 74 "src/regex/tre-mem.c", 75 "src/stdio/__fdopen.c", 76 "src/stdio/__fmodeflags.c", 77 "src/stdio/__lockfile.c", 78 "src/stdio/__overflow.c", 79 "src/stdio/__stdio_close.c", 80 "src/stdio/__stdio_read.c", 81 "src/stdio/__stdio_seek.c", 82 "src/stdio/__stdio_write.c", 83 "src/stdio/__stdout_write.c", 84 "src/stdio/__toread.c", 85 "src/stdio/__towrite.c", 86 "src/stdio/__uflow.c", 87 "src/stdio/clearerr.c", 88 "src/stdio/fclose.c", 89 "src/stdio/feof.c", 90 "src/stdio/fflush.c", 91 "src/stdio/fgets.c", 92 "src/stdio/fileno.c", 93 "src/stdio/fopen.c", 94 "src/stdio/fputc.c", 95 "src/stdio/fputs.c", 96 "src/stdio/fread.c", 97 "src/stdio/fseek.c", 98 "src/stdio/ftell.c", 99 "src/stdio/fwrite.c", 100 "src/stdio/ofl.c", 101 "src/stdio/ofl_add.c", 102 "src/stdio/perror.c", 103 "src/stdio/remove.c", 104 "src/stdio/rewind.c", 105 "src/stdio/snprintf.c", 106 "src/stdio/stderr.c", 107 "src/stdio/stdin.c", 108 "src/stdio/stdout.c", 109 "src/stdio/vfprintf.c", 110 "src/stdio/vsnprintf.c", 111 "src/stdio/vsprintf.c", 112 "src/stdlib/abs.c", 113 "src/stdlib/atof.c", 114 "src/stdlib/atoi.c", 115 116 #"src/stdlib/strtol.c", 117 "src/locale/iconv.c", 118 "src/stdio/ungetc.c", 119 "src/stdlib/atol.c", 120 "src/stdlib/atoll.c", 121 "src/stdlib/bsearch.c", 122 "src/stdlib/llabs.c", 123 "src/stdlib/strtod.c", 124 "src/string/memchr.c", 125 "src/string/memcmp.c", 126 "src/string/memcpy.c", 127 "src/string/memmove.c", 128 "src/string/memrchr.c", 129 "src/string/memset.c", 130 "src/string/stpcpy.c", 131 "src/string/strcasecmp.c", 132 "src/string/strcat.c", 133 "src/string/strchr.c", 134 "src/string/strchrnul.c", 135 "src/string/strcmp.c", 136 "src/string/strcspn.c", 137 "src/string/strdup.c", 138 "src/string/strlen.c", 139 "src/string/strncasecmp.c", 140 "src/string/strncmp.c", 141 "src/string/strncpy.c", 142 "src/string/strnlen.c", 143 "src/string/strrchr.c", 144 "src/string/strspn.c", 145 "src/string/strstr.c", 146 "src/string/strtok.c", 147 "src/string/wcschr.c", 148 "src/string/wcslen.c", 149 "src/time/__month_to_secs.c", 150 "src/time/__secs_to_tm.c", 151 "src/time/__tm_to_secs.c", 152 "src/time/__tz.c", 153 "src/time/__year_to_secs.c", 154 "src/time/asctime.c", 155 "src/time/asctime_r.c", 156 "src/time/ctime.c", 157 "src/time/strftime.c", 158 "src/time/strptime.c", 159 ] 160 161 include_dirs = [ 162 "src/include", 163 "src/internal", 164 ] 165 166 include_dirs += [ 167 "//kernel/liteos_m/kernel/arch/include", 168 "//kernel/liteos_m/kernel/include", 169 "//kernel/liteos_m/utils", 170 ] 171 172 public_configs = [ ":include" ] 173} 174 175static_library(libm) { 176 sources = [ 177 "src/math/__fpclassify.c", 178 "src/math/__fpclassifyl.c", 179 "src/math/__signbit.c", 180 "src/math/__signbitl.c", 181 "src/math/exp_data.c", 182 "src/math/frexp.c", 183 "src/math/frexpl.c", 184 "src/math/log.c", 185 "src/math/log_data.c", 186 "src/math/pow.c", 187 "src/math/pow_data.c", 188 "src/math/round.c", 189 "src/math/sqrt.c", 190 ] 191 192 include_dirs = [ 193 "src/include", 194 "src/internal", 195 ] 196 197 public_configs = [ ":include" ] 198} 199 200group("kernel") { 201 public_deps = [ 202 ":$libc", 203 ":$libm", 204 ] 205} 206