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