1
0

meson.build 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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/game.c',
  16. 'src/common/networking.c'
  17. ]
  18. common_include = include_directories(
  19. 'src/common/'
  20. )
  21. scufeng_dep = dependency(
  22. 'scufeng',
  23. allow_fallback: true
  24. )
  25. game = executable(
  26. 'game',
  27. 'src/game/MainMenu.c',
  28. 'src/game/MultiPlayer.c',
  29. 'src/game/SinglePlayer.c',
  30. 'src/game/pong.c',
  31. 'src/game/screen.c',
  32. common_src,
  33. include_directories: [
  34. common_include
  35. ],
  36. c_args: [
  37. c_args,
  38. '-DFONT_PATH="../assets/LiberationSans-Regular.ttf"',
  39. '-D_DEFAULT_SOURCE' # for inet_aton
  40. ],
  41. link_args: [
  42. '-lm'
  43. ],
  44. dependencies: [
  45. scufeng_dep
  46. ]
  47. )
  48. server = executable(
  49. 'server',
  50. 'src/server/server.c',
  51. common_src,
  52. include_directories: [
  53. common_include
  54. ],
  55. c_args: [
  56. c_args,
  57. '-D_DEFAULT_SOURCE' # for inet_aton
  58. ],
  59. link_args: [
  60. '-lm'
  61. ],
  62. dependencies: [
  63. scufeng_dep
  64. ]
  65. )