2026-06-13 19:45:36 +10:00
|
|
|
project('ground', 'c', version : '0.1.0')
|
|
|
|
|
|
2026-06-15 20:27:50 +10:00
|
|
|
pkg = import('pkgconfig')
|
|
|
|
|
|
2026-06-13 19:45:36 +10:00
|
|
|
sources = files(
|
2026-06-21 14:35:48 +10:00
|
|
|
|
|
|
|
|
'src/Bytecode/Heap/get.c',
|
|
|
|
|
'src/Bytecode/Heap/set.c',
|
2026-06-21 16:13:00 +10:00
|
|
|
'src/Bytecode/save.c',
|
|
|
|
|
'src/Bytecode/load.c',
|
2026-06-21 14:35:48 +10:00
|
|
|
'src/Bytecode/Instruction/execute.c',
|
|
|
|
|
'src/Bytecode/Program/execute.c',
|
|
|
|
|
'src/Bytecode/Program/optimise.c',
|
|
|
|
|
|
2026-06-13 19:45:36 +10:00
|
|
|
'src/Copy/Arg.c',
|
|
|
|
|
'src/Copy/Function.c',
|
|
|
|
|
'src/Copy/Instruction.c',
|
|
|
|
|
'src/Copy/List.c',
|
|
|
|
|
'src/Copy/Object.c',
|
|
|
|
|
'src/Copy/Program.c',
|
|
|
|
|
'src/Copy/State.c',
|
|
|
|
|
'src/Copy/String.c',
|
|
|
|
|
'src/Copy/Struct.c',
|
|
|
|
|
'src/Copy/Value.c',
|
|
|
|
|
|
2026-06-17 10:11:15 +10:00
|
|
|
'src/Copy/Identifier.c',
|
|
|
|
|
|
2026-06-13 19:45:36 +10:00
|
|
|
'src/Free/Function.c',
|
|
|
|
|
'src/Free/List.c',
|
|
|
|
|
'src/Free/Object.c',
|
|
|
|
|
'src/Free/String.c',
|
|
|
|
|
'src/Free/Struct.c',
|
|
|
|
|
'src/Free/Value.c',
|
|
|
|
|
|
2026-06-16 20:08:21 +10:00
|
|
|
'src/Free/Arg.c',
|
|
|
|
|
'src/Free/Instruction.c',
|
|
|
|
|
'src/Free/Program.c',
|
|
|
|
|
'src/Free/State.c',
|
|
|
|
|
|
2026-06-17 10:11:15 +10:00
|
|
|
'src/Free/Identifier.c',
|
|
|
|
|
|
2026-06-13 19:45:36 +10:00
|
|
|
'src/Function/appendInstruction.c',
|
|
|
|
|
'src/Function/appendArg.c',
|
|
|
|
|
|
|
|
|
|
'src/Instruction/append.c',
|
|
|
|
|
'src/Instruction/execute.c',
|
|
|
|
|
|
2026-06-15 20:27:50 +10:00
|
|
|
'src/Internal/giveUpAndCry.c',
|
|
|
|
|
'src/Internal/run.c',
|
|
|
|
|
|
2026-06-13 19:45:36 +10:00
|
|
|
'src/libmain.c',
|
|
|
|
|
|
|
|
|
|
'src/List/append.c',
|
|
|
|
|
|
2026-06-15 20:27:50 +10:00
|
|
|
'src/Log/Error.c',
|
|
|
|
|
'src/Log/printErrors.c',
|
|
|
|
|
'src/Log/Warning.c',
|
|
|
|
|
|
2026-06-13 19:45:36 +10:00
|
|
|
'src/New/Arg/DirectRef.c',
|
|
|
|
|
'src/New/Arg/FunctionRef.c',
|
|
|
|
|
'src/New/Arg/LabelRef.c',
|
|
|
|
|
'src/New/Arg/LineRef.c',
|
|
|
|
|
'src/New/Arg/TypeRef.c',
|
|
|
|
|
'src/New/Arg/Value.c',
|
|
|
|
|
'src/New/Arg/ValueRef.c',
|
|
|
|
|
|
|
|
|
|
'src/New/Error.c',
|
|
|
|
|
'src/New/Function.c',
|
|
|
|
|
'src/New/List.c',
|
|
|
|
|
'src/New/Object.c',
|
|
|
|
|
'src/New/String.c',
|
|
|
|
|
'src/New/Struct.c',
|
|
|
|
|
|
2026-06-17 10:11:15 +10:00
|
|
|
'src/New/Identifier.c',
|
|
|
|
|
|
2026-06-21 14:35:48 +10:00
|
|
|
'src/New/Bytecode.c',
|
|
|
|
|
|
2026-06-13 19:45:36 +10:00
|
|
|
'src/New/NativeFunction.c',
|
|
|
|
|
|
|
|
|
|
'src/New/Instruction.c',
|
|
|
|
|
'src/New/Program.c',
|
|
|
|
|
'src/New/Type.c',
|
|
|
|
|
|
|
|
|
|
'src/New/Value/Bool.c',
|
|
|
|
|
'src/New/Value/Char.c',
|
|
|
|
|
'src/New/Value/Double.c',
|
|
|
|
|
'src/New/Value/Function.c',
|
|
|
|
|
'src/New/Value/Int.c',
|
|
|
|
|
'src/New/Value/List.c',
|
|
|
|
|
'src/New/Value/Object.c',
|
|
|
|
|
'src/New/Value/String.c',
|
|
|
|
|
'src/New/Value/Struct.c',
|
|
|
|
|
|
|
|
|
|
'src/Program/append.c',
|
|
|
|
|
'src/Program/execute.c',
|
|
|
|
|
|
2026-06-15 20:27:50 +10:00
|
|
|
'src/State/findCatch.c',
|
|
|
|
|
'src/State/findLabel.c',
|
|
|
|
|
'src/State/findVariable.c',
|
|
|
|
|
|
2026-06-25 18:57:53 +10:00
|
|
|
'src/Stringify/Arg.c',
|
|
|
|
|
'src/Stringify/Heap.c',
|
|
|
|
|
'src/Stringify/Instruction.c',
|
|
|
|
|
'src/Stringify/Program.c',
|
|
|
|
|
'src/Stringify/String.c',
|
|
|
|
|
'src/Stringify/Value.c',
|
|
|
|
|
|
|
|
|
|
'src/Struct/addField.c',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'src/linenoise/linenoise.c'
|
2026-06-13 19:45:36 +10:00
|
|
|
)
|
|
|
|
|
|
2026-06-21 16:13:00 +10:00
|
|
|
cli_sources = files(
|
|
|
|
|
'src/cli/main.c'
|
|
|
|
|
)
|
|
|
|
|
|
2026-06-13 19:45:36 +10:00
|
|
|
incdir = include_directories('include')
|
|
|
|
|
|
|
|
|
|
libffi = dependency('libffi', version : '>=3.0.0')
|
|
|
|
|
|
2026-06-15 20:27:50 +10:00
|
|
|
install_headers('include/ground.h')
|
|
|
|
|
|
|
|
|
|
lib = shared_library('ground', sources, include_directories : incdir, dependencies : libffi, install : true)
|
|
|
|
|
|
|
|
|
|
pkg.generate(lib,
|
|
|
|
|
name : 'ground',
|
|
|
|
|
version : meson.project_version(),
|
|
|
|
|
description : 'Ground virtual machine',
|
|
|
|
|
)
|
2026-06-21 16:13:00 +10:00
|
|
|
|
|
|
|
|
cli = executable('ground', cli_sources, include_directories : incdir, install : true, link_with : lib)
|