roza/meson.build

77 lines
1.2 KiB
Meson
Raw Normal View History

2023-12-07 19:16:58 +00:00
project(
'roza',
'c',
version: '0.0.0'
)
2023-12-15 21:31:01 +00:00
cc = meson.get_compiler('c')
m_dep = cc.find_library('m', required: true)
2023-12-07 19:16:58 +00:00
conf = configuration_data()
conf.set('version', meson.project_version())
configure_file(
input: 'lib/conf.in.h',
output: 'conf.h',
configuration: conf
)
roza_lib = static_library(
'roza',
sources: [
2023-12-09 17:24:41 +00:00
# utils
'lib/str.c',
# core
'lib/err.c',
'lib/loader.c',
'lib/sym.c',
2023-12-09 17:24:41 +00:00
# lang
'lib/node.c',
'lib/lexer.c',
'lib/parser.c',
'lib/type.c',
'lib/value.c',
'lib/tysy.c',
'lib/tysolver.c',
2023-12-09 17:24:41 +00:00
# comp
'lib/opcodes.c',
'lib/mod.c',
2023-12-11 17:01:22 +00:00
'lib/prepass.c',
2023-12-09 17:24:41 +00:00
'lib/compiler.c',
# exec
'lib/vm.c',
2023-12-15 21:31:01 +00:00
],
dependencies: [
m_dep
2023-12-07 19:16:58 +00:00
]
)
roza_dep = declare_dependency(
link_with: roza_lib,
include_directories: ['lib']
)
executable('roza',
sources: [
'src/main.c'
],
dependencies: [
roza_dep
],
install: true)
executable('roza-tests',
sources: [
2023-12-09 17:24:41 +00:00
'tests/units/lexer.c',
'tests/units/parser.c',
2023-12-07 19:16:58 +00:00
],
dependencies: [
roza_dep,
dependency('criterion')
])