meson.build 891 B

12345678910111213141516171819202122232425262728293031323334353637
  1. project('lonelytiger', 'c')
  2. src = [
  3. 'tokenizer/Tokenizer.c',
  4. 'tokenizer/Token.c',
  5. 'tokenizer/File.c',
  6. 'utils/SnuviUtils.c',
  7. 'utils/Variables.c',
  8. 'utils/Functions.c',
  9. 'utils/ByteCodePrinter.c',
  10. 'Compiler.c',
  11. 'DataType.c',
  12. 'Test.c',
  13. 'vm/ByteCode.c',
  14. 'vm/Script.c',
  15. 'vm/Arrays.c',
  16. 'libraries/Time.c',
  17. 'libraries/Math.c'
  18. ]
  19. cc = meson.get_compiler('c')
  20. math_dep = cc.find_library('m', required : true)
  21. args = ['-Wall', '-Wextra', '-pedantic', '-Werror']
  22. inc = include_directories('.')
  23. liblonelytiger = static_library('lonelytiger',
  24. sources: src,
  25. include_directories : inc,
  26. dependencies : math_dep,
  27. c_args: args)
  28. liblonelytiger_dep = declare_dependency(include_directories : inc, link_with : liblonelytiger)
  29. executable('tests',
  30. sources: src + ['Main.c'],
  31. dependencies : math_dep,
  32. c_args: args)