2026-08-17 13:38:51 +02:00
|
|
|
# ModuLisp — standalone build of the portable engine extracted from uSEQ.
|
|
|
|
|
#
|
|
|
|
|
# Provenance: extracted from /home/w1n5t0n/src/useq-perform/src-useq @ git
|
|
|
|
|
# 1081ae8 (working-tree state, 2026-08-17). Library structure, flags and
|
|
|
|
|
# source lists mirror src-useq/meson.build; the firmware library and every
|
|
|
|
|
# firmware/WASM/nodedef-dependent test are intentionally absent.
|
|
|
|
|
|
|
|
|
|
project('modulisp', 'cpp',
|
|
|
|
|
default_options : ['cpp_std=c++17'],
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Add global compiler arguments with sensible warning configuration
|
|
|
|
|
# (identical to src-useq/meson.build).
|
|
|
|
|
common_warning_args = [
|
|
|
|
|
'-Wall', # Enable most warnings
|
|
|
|
|
'-Wextra', # Enable extra warnings
|
|
|
|
|
'-Wpedantic', # Pedantic warnings for ISO C++ compliance
|
|
|
|
|
'-Wshadow', # Warn about variable shadowing
|
|
|
|
|
'-Wunused', # Warn about unused variables/functions
|
|
|
|
|
'-Wuninitialized', # Warn about uninitialized variables
|
|
|
|
|
'-Wdouble-promotion', # Warn about float to double promotions
|
|
|
|
|
'-Wformat=2', # Strict format string checking
|
|
|
|
|
'-Wnull-dereference', # Warn about null pointer dereferences
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
add_global_arguments(common_warning_args, language : 'cpp')
|
|
|
|
|
|
|
|
|
|
# Define include directories
|
|
|
|
|
src_inc = include_directories('src')
|
|
|
|
|
|
|
|
|
|
# Define precompiled header for faster compilation
|
|
|
|
|
pch_file = 'src/pch.h'
|
|
|
|
|
|
|
|
|
|
# Host (non-Arduino) compile flags, mirroring src-useq with the always-on
|
|
|
|
|
# test configuration baked in: signal engine + devtools telemetry enabled.
|
|
|
|
|
standalone_args = [
|
|
|
|
|
'-DUSE_OWN_ARDUINO_STR',
|
|
|
|
|
'-DUSE_STD_IO',
|
|
|
|
|
'-DNO_ETL',
|
|
|
|
|
'-D__not_in_flash(section)=',
|
|
|
|
|
'-D__not_in_flash_func(x)=',
|
|
|
|
|
'-DENABLE_SIGNAL_ENGINE',
|
|
|
|
|
'-DUSEQ_DEVTOOLS=1',
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
# === STATIC LIBRARIES FOR PROPER DEPENDENCY TRACKING ===
|
|
|
|
|
|
|
|
|
|
# Utils library - lowest level, no dependencies
|
|
|
|
|
utils_lib = static_library('useq_utils',
|
|
|
|
|
'src/utils/string.cpp',
|
|
|
|
|
'src/utils/common.cpp',
|
|
|
|
|
'src/utils/itoa.cpp',
|
|
|
|
|
'src/utils/log.cpp',
|
|
|
|
|
include_directories : src_inc,
|
|
|
|
|
cpp_args : standalone_args,
|
|
|
|
|
cpp_pch : pch_file,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Create a dependency object for utils
|
|
|
|
|
utils_dep = declare_dependency(
|
|
|
|
|
link_with : utils_lib,
|
|
|
|
|
include_directories : src_inc
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Devtools library - compile-time-gated telemetry instrumentation
|
|
|
|
|
devtools_inc = include_directories('src/devtools')
|
|
|
|
|
devtools_lib = static_library('useq_devtools',
|
|
|
|
|
'src/devtools/devtools.cpp',
|
|
|
|
|
include_directories : [src_inc, devtools_inc],
|
|
|
|
|
cpp_args : standalone_args,
|
|
|
|
|
cpp_pch : pch_file,
|
|
|
|
|
dependencies : utils_dep,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
devtools_dep = declare_dependency(
|
|
|
|
|
link_with : devtools_lib,
|
|
|
|
|
include_directories : [src_inc, devtools_inc],
|
|
|
|
|
dependencies : utils_dep
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Signal engine library - depends on utils (symbol_intern.h is header-only)
|
|
|
|
|
signal_engine_lib = static_library('useq_signal_engine',
|
|
|
|
|
'src/signal_engine/diagnostics.cpp',
|
|
|
|
|
'src/signal_engine/token.cpp',
|
|
|
|
|
'src/signal_engine/cell_store.cpp',
|
|
|
|
|
'src/signal_engine/node_pool.cpp',
|
|
|
|
|
'src/signal_engine/executor.cpp',
|
|
|
|
|
'src/signal_engine/graph_builder.cpp',
|
2026-08-17 14:08:21 +02:00
|
|
|
'src/signal_engine/ext_registry.cpp',
|
2026-08-17 13:38:51 +02:00
|
|
|
'src/signal_engine/compiler_pipeline.cpp',
|
|
|
|
|
'src/signal_engine/cold_eval.cpp',
|
|
|
|
|
'src/signal_engine/state_registry.cpp',
|
|
|
|
|
'src/signal_engine/synth_registry.cpp',
|
|
|
|
|
'src/signal_engine/synth_graph.cpp',
|
|
|
|
|
include_directories : src_inc,
|
|
|
|
|
cpp_args : standalone_args,
|
|
|
|
|
cpp_pch : pch_file,
|
|
|
|
|
dependencies : [utils_dep, devtools_dep],
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
signal_engine_dep = declare_dependency(
|
|
|
|
|
link_with : signal_engine_lib,
|
|
|
|
|
include_directories : src_inc,
|
|
|
|
|
dependencies : [utils_dep, devtools_dep]
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Add test subdirectory
|
|
|
|
|
subdir('test')
|