62 lines
900 B
Meson
62 lines
900 B
Meson
project(
|
|
'WuZ',
|
|
'c',
|
|
version: '0.0.0',
|
|
default_options: [
|
|
'warning_level=3'
|
|
]
|
|
)
|
|
|
|
flex = find_program('flex')
|
|
flex_target = custom_target(
|
|
'flex',
|
|
input: ['src/lex.l'],
|
|
output: ['lex.yy.c'],
|
|
command: [
|
|
flex, '@INPUT@'
|
|
]
|
|
)
|
|
|
|
bison = find_program('bison')
|
|
bison_target = custom_target(
|
|
'bison',
|
|
input: ['src/parser.y'],
|
|
output: ['parser.c'],
|
|
command: [
|
|
bison, '-d', '-o', '@OUTPUT@', '@INPUT@'
|
|
]
|
|
)
|
|
|
|
cc = meson.get_compiler('c')
|
|
m_dep = cc.find_library('m')
|
|
|
|
executable(
|
|
'wuz',
|
|
sources: [
|
|
flex_target,
|
|
bison_target,
|
|
'src/main.c',
|
|
'src/node.c',
|
|
'src/utils.c',
|
|
'src/opcodes.c',
|
|
'src/program.c',
|
|
'src/block_info.c',
|
|
|
|
'src/value.c',
|
|
'src/array.c',
|
|
|
|
'src/type.c',
|
|
'src/compiler.c',
|
|
'src/cstatic.c',
|
|
'src/vm.c',
|
|
|
|
'src/symtable.c',
|
|
'src/fun.c',
|
|
],
|
|
dependencies: [
|
|
m_dep
|
|
],
|
|
install: true
|
|
)
|
|
|