1
0

meson.build 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. project(
  2. 'scufpong',
  3. 'c',
  4. default_options: [
  5. 'force_fallback_for=scufeng'
  6. ]
  7. )
  8. c_args = [
  9. '-std=c23',
  10. '-Wall',
  11. '-Wextra',
  12. '-pedantic'
  13. ]
  14. common_src = [
  15. 'src/common/GameState_net.c',
  16. 'src/common/game.c',
  17. 'src/common/networking.c',
  18. 'src/common/util.c'
  19. ]
  20. common_include = include_directories(
  21. 'src/common/'
  22. )
  23. scufeng_dep = dependency(
  24. 'scufeng',
  25. fallback: 'scufeng-' + build_machine.cpu(),
  26. )
  27. game = executable(
  28. 'game',
  29. 'src/game/MainMenu.c',
  30. 'src/game/MultiPlayer.c',
  31. 'src/game/SinglePlayer.c',
  32. 'src/game/game_common.c',
  33. 'src/game/pong.c',
  34. common_src,
  35. include_directories: [
  36. common_include
  37. ],
  38. c_args: [
  39. c_args,
  40. '-DFONT_PATH="../assets/LiberationSans-Regular.ttf"',
  41. '-D_DEFAULT_SOURCE', # for inet_aton
  42. ],
  43. link_args: [
  44. '-lm'
  45. ],
  46. dependencies: [
  47. scufeng_dep
  48. ]
  49. )
  50. server = executable(
  51. 'server',
  52. 'src/server/server.c',
  53. common_src,
  54. include_directories: [
  55. common_include
  56. ],
  57. c_args: [
  58. c_args,
  59. '-D_DEFAULT_SOURCE' # for inet_aton
  60. ],
  61. link_args: [
  62. '-lm'
  63. ],
  64. dependencies: [
  65. scufeng_dep
  66. ]
  67. )