project('ground', 'c', version : '0.1.0') pkg = import('pkgconfig') sources = files( 'src/Bytecode/Heap/get.c', 'src/Bytecode/Heap/set.c', 'src/Bytecode/save.c', 'src/Bytecode/load.c', 'src/Bytecode/Instruction/execute.c', 'src/Bytecode/Program/execute.c', 'src/Bytecode/Program/optimise.c', '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', 'src/Copy/Identifier.c', 'src/Copy/BytecodeValue.c', 'src/FFI/openSharedObject.c', 'src/FFI/getFunction.c', 'src/Free/Function.c', 'src/Free/List.c', 'src/Free/Object.c', 'src/Free/String.c', 'src/Free/Struct.c', 'src/Free/Value.c', 'src/Free/Arg.c', 'src/Free/Instruction.c', 'src/Free/Program.c', 'src/Free/State.c', 'src/Free/Identifier.c', 'src/Free/BytecodeValue.c', 'src/Function/appendInstruction.c', 'src/Function/appendArg.c', 'src/Instruction/append.c', 'src/Instruction/execute.c', 'src/Internal/giveUpAndCry.c', 'src/Internal/run.c', 'src/libmain.c', 'src/List/append.c', 'src/Log/Error.c', 'src/Log/printErrors.c', 'src/Log/Warning.c', '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', 'src/New/Identifier.c', 'src/New/Bytecode.c', 'src/New/BytecodeValue.c', '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', 'src/Program/preprocess.c', 'src/State/findCatch.c', 'src/State/findLabel.c', 'src/State/findVariable.c', '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/Stringify/BytecodeValue.c', 'src/Struct/addField.c', #'src/linenoise/linenoise.c' ) if host_machine.system() != 'windows' sources += ['src/linenoise/linenoise.c'] endif cli_sources = files( 'src/cli/main.c' ) incdir = include_directories('include') libffi = dependency('libffi', version : '>=3.0.0') install_headers('include/ground.h') lib = both_libraries('ground', sources, include_directories : incdir, dependencies : libffi, install : true) pkg.generate(lib, name : 'ground', version : meson.project_version(), description : 'Ground virtual machine', ) cli = executable('ground', cli_sources, include_directories : incdir, install : true, link_with : lib)