| 1 | // Copyright (c) 2019-2024 Alexander Medvednikov. All rights reserved. |
| 2 | // Use of this source code is governed by an MIT license |
| 3 | // that can be found in the LICENSE file. |
| 4 | module stbi |
| 5 | |
| 6 | // Note: stbi uses math.h because of `ldexp` and `pow`, for which we *do* have |
| 7 | // pure V implementations, but our `math` module still depends on libm |
| 8 | // because of 'powf', 'cosf', 'sinf', 'sqrtf' and 'tanf'. |
| 9 | |
| 10 | // TODO: remove this file, when we have pure V implementations for the above |
| 11 | // functions too, and so `math` is no longer dependent on `libm` at all. |
| 12 | |
| 13 | #include <math.h> |
| 14 | |
| 15 | $if windows { |
| 16 | $if tinyc { |
| 17 | #flag @VEXEROOT/thirdparty/tcc/lib/openlibm.o |
| 18 | } |
| 19 | } $else { |
| 20 | #flag -lm |
| 21 | } |
| 22 | |