DFPSR.DsrHead 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # A project header for using the DFPSR library.
  2. # Backends:
  3. # * Give the Graphics flag if the application should be able to create a window.
  4. # * Give the Sound flag if the application should be able to generate sounds.
  5. # Systems:
  6. # * Give the Linux flag when compiling on Linux or similar Posix systems having the same dependencies installed.
  7. # * Give the MacOS flag when compiling on MacOS.
  8. # * Give the Windows flag when compiling on Microsoft Windows.
  9. if Linux
  10. Message "Building for Linux\n"
  11. end if
  12. if MacOS
  13. Message "Building for MacOS\n"
  14. end if
  15. if Windows
  16. Message "Building for Windows\n"
  17. end if
  18. # Standard math library
  19. Link "m"
  20. # Posix threading library on all platforms for consistent behavior
  21. Link "pthread"
  22. # Paths are relative to the current script, even if imported somewhere else
  23. # so we use .. to leave the Source/DFPSR folder and then go into the windowManagers folder.
  24. WindowManager = "../windowManagers/NoWindow.cpp"
  25. if Graphics
  26. Message "Building with graphics enabled\n"
  27. if Linux
  28. Message " Using X11\n"
  29. Link "X11"
  30. WindowManager = "../windowManagers/X11Window.cpp"
  31. end if
  32. if MacOS
  33. Message " Using Cocoa\n"
  34. Framework "Cocoa"
  35. WindowManager = "../windowManagers/CocoaWindow.mm"
  36. end if
  37. if Windows
  38. Message " Using Win32\n"
  39. Link "gdi32"
  40. Link "user32"
  41. Link "kernel32"
  42. Link "comctl32"
  43. WindowManager = "../windowManagers/Win32Window.cpp"
  44. # If the UNICODE macro is not set, SetWindowTextW will behave as SetWindowTextA and null terminate from the second byte in the first character.
  45. CompilerFlag "-DUNICODE"
  46. end if
  47. end if
  48. Crawl WindowManager
  49. SoundManager = "../soundManagers/NoSound.cpp"
  50. if Sound
  51. Message "Building with sound enabled\n"
  52. if Linux
  53. Message " Using Alsa\n"
  54. Link "asound"
  55. SoundManager = "../soundManagers/AlsaSound.cpp"
  56. end if
  57. if MacOS
  58. Message " Using CoreAudio\n"
  59. #Linking to AudioUnit, which is a part of CoreAudio.
  60. Framework "AudioUnit"
  61. SoundManager = "../soundManagers/CoreAudioSound.cpp"
  62. end if
  63. if Windows
  64. Message " Using WinMM\n"
  65. Link "winmm"
  66. SoundManager = "../soundManagers/WinMMSound.cpp"
  67. end if
  68. end if
  69. Crawl SoundManager