meson.build 913 B

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