12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- project('lonelytiger', 'c')
- src = [
- 'tokenizer/Tokenizer.c',
- 'tokenizer/Token.c',
- 'tokenizer/FileTokens.c',
- 'utils/SnuviUtils.c',
- 'utils/Variables.c',
- 'utils/Functions.c',
- 'utils/ByteCodePrinter.c',
- 'Compiler.c',
- 'DataType.c',
- 'Error.c',
- 'Test.c',
- 'vm/ByteCode.c',
- 'vm/Script.c',
- 'vm/Arrays.c',
- 'libraries/Time.c',
- 'libraries/Math.c'
- ]
- cc = meson.get_compiler('c')
- math_dep = cc.find_library('m', required : true)
- args = cc.get_supported_arguments([
- '-Werror', '-pedantic', '-pedantic-errors', '-Wall', '-Wextra', '-Wdouble-promotion',
- '-Wformat=2', '-Wformat-signedness', '-Wnull-dereference', '-Winfinite-recursion',
- '-Winit-self', '-Wmissing-include-dirs', '-Wshift-overflow=2', '-Wtrivial-auto-var-init',
- '-Wduplicated-branches', '-Wduplicated-cond', '-Wfloat-equal', '-Wshadow', '-Wundef',
- '-Wcast-qual', '-Wcast-align=strict', '-Wconversion', '-Warith-conversion',
- '-Wsign-conversion', '-Wlogical-op', '-Wmissing-declarations', '-Wpadded',
- '-Woverlength-strings', '-Wwrite-strings', '-Walloca', '-Walloc-zero', '-Wdate-time',
- '-Wc++-compat', '-Wdisabled-optimization', '-Winvalid-pch', '-Wmultichar',
- '-Wbidi-chars=any', '-Wbad-function-cast', '-Wjump-misses-init', '-Wstrict-prototypes',
- '-Wmissing-prototypes', '-Wnested-externs', '-Wunsuffixed-float-constants', '-Wredundant-decls'
- ])
- inc = include_directories('.')
- liblonelytiger = static_library('lonelytiger',
- sources: src,
- include_directories : inc,
- dependencies : math_dep,
- c_args: args)
- liblonelytiger_dep = declare_dependency(include_directories : inc, link_with : liblonelytiger)
- executable('tests',
- sources: src + ['Main.c'],
- dependencies : math_dep,
- c_args: args)
|