diff --git a/libraries/math_neon/lib.metadata b/libraries/math_neon/lib.metadata index 8bae52a78..558ec5d1b 100644 --- a/libraries/math_neon/lib.metadata +++ b/libraries/math_neon/lib.metadata @@ -2,5 +2,4 @@ name=math_neon description=A convenience wrapper for math_neon, a fast, optimized, approximated, math library. examples=Fundamentals/sinetone-optimized-bank, Fundamentals/scope-advanced, Salt/pink-trombone license=MIT -LDLIBS=-lmathneon - +LDLIBS=$$(bash -c "[ `arch` == armv7l ] && printf \-lmathneon" ) diff --git a/libraries/math_neon/math_neon.h b/libraries/math_neon/math_neon.h index b61d58ec3..15ff6aaf9 100644 --- a/libraries/math_neon/math_neon.h +++ b/libraries/math_neon/math_neon.h @@ -1,2 +1,12 @@ #pragma once +#if __has_include_next() #include_next +#else +#include +// TODO: add more +#define sqrtf_neon(a) sqrtf(a) +#define sinf_neon(a) sinf(a) +#define cosf_neon(a) cosf(a) +#define expf_neon(a) expf(a) +#define logf_neon(a) logf(a) +#endif