CXXFLAGS := -std=c++20 -O2 \
-Isource -Isource/imgui -Isource/stmdsp -Isource/serial/include \
-Wall -Wextra -pedantic \
- -DSTMDSP_WIN32 -Wa,-mbig-obj
+ -DSTMDSP_WIN32 -Wa,-mbig-obj -DSTMDSP_DISABLE_FORMULAS
LDFLAGS = -mwindows -lSDL2 -lopengl32 -lsetupapi -lole32
all: $(OUTPUT)
* If not, see <https://www.gnu.org/licenses/>.
*/
+#include "stmdsp.hpp"
+
+#include <algorithm>
+#include <random>
+#include <string_view>
+#include <vector>
+
+#ifndef STMDSP_DISABLE_FORMULAS
+
#define exprtk_disable_comments
#define exprtk_disable_break_continue
#define exprtk_disable_sc_andor
//#define exprtk_disable_caseinsensitivity
#include "exprtk.hpp"
-#include "stmdsp.hpp"
-
-#include <algorithm>
-#include <random>
-#include <string_view>
-#include <vector>
-
static std::random_device randomDevice;
std::vector<stmdsp::dacsample_t> deviceGenLoadFormulaEval(const std::string& formulaString)
return samples;
}
+#else // no formula support
+
+std::vector<stmdsp::dacsample_t> deviceGenLoadFormulaEval(const std::string&)
+{
+ return {};
+}
+
+#endif // STMDSP_DISABLE_FORMULAS
+