DFPSR.DsrHead 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 Windows flag when compiling on Microsoft Windows.
  8. # Features:
  9. # * Give the ReuseMemory flag to enable memory recycling using allocator.cpp.
  10. # This can cause crashes if you have more than one memory recycler linked,
  11. # because you don't want one implementation allocating and another freeing.
  12. # Strings use a subset of the C standard for mangling, so \\ is used to write \.
  13. # You can also use / and let the file abstraction layer convert it into \ automatically when running on Windows.
  14. if ReuseMemory
  15. Crawl "base/allocator.cpp"
  16. end if
  17. if Linux
  18. Message "Building for Linux\n"
  19. end if
  20. if Windows
  21. Message "Building for Windows\n"
  22. end if
  23. # Paths are relative to the current script, even if imported somewhere else
  24. # so we use .. to leave the Source/DFPSR folder and then go into the windowManagers folder.
  25. WindowManager = "../windowManagers/NoWindow.cpp"
  26. if Graphics
  27. Message "Building with graphics enabled"
  28. if Linux
  29. Message " Using X11\n"
  30. Link "X11"
  31. WindowManager = "../windowManagers/X11Window.cpp"
  32. end if
  33. if Windows
  34. Message " Using Win32\n"
  35. Link "gdi32"
  36. Link "user32"
  37. Link "kernel32"
  38. Link "comctl32"
  39. WindowManager = "../windowManagers/Win32Window.cpp"
  40. end if
  41. end if
  42. Crawl WindowManager
  43. SoundManager = "../soundManagers/NoSound.cpp"
  44. if Sound
  45. Message "Building with sound enabled"
  46. if Linux
  47. Message " Using Alsa\n"
  48. Link "asound"
  49. SoundManager = "../soundManagers/AlsaSound.cpp"
  50. end if
  51. if Windows
  52. Message " Using WinMM\n"
  53. Link "winmm"
  54. SoundManager = "../soundManagers/WinMMSound.cpp"
  55. end if
  56. end if
  57. Crawl SoundManager