Guest User

Untitled

a guest
Aug 7th, 2021
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. # Alternative GNU Make workspace makefile autogenerated by Premake
  2.  
  3. ifndef config
  4. config=debug
  5. endif
  6.  
  7. ifndef verbose
  8. SILENT = @
  9. endif
  10.  
  11. ifeq ($(config),debug)
  12. ghh_config = debug
  13. glad_config = debug
  14. ghhgfx_config = debug
  15. cJSON_config = debug
  16. game_config = debug
  17.  
  18. else ifeq ($(config),release)
  19. ghh_config = release
  20. glad_config = release
  21. ghhgfx_config = release
  22. cJSON_config = release
  23. game_config = release
  24.  
  25. else
  26. $(error "invalid configuration $(config)")
  27. endif
  28.  
  29. PROJECTS := ghh glad ghhgfx cJSON game
  30.  
  31. .PHONY: all clean help $(PROJECTS)
  32.  
  33. all: $(PROJECTS)
  34.  
  35. ghh:
  36. ifneq (,$(ghh_config))
  37. @echo "==== Building ghh ($(ghh_config)) ===="
  38. @${MAKE} --no-print-directory -C ../external/libghhgfx/external/libghh -f Makefile config=$(ghh_config)
  39. endif
  40.  
  41. glad:
  42. ifneq (,$(glad_config))
  43. @echo "==== Building glad ($(glad_config)) ===="
  44. @${MAKE} --no-print-directory -C ../external/libghhgfx/external/glad -f Makefile config=$(glad_config)
  45. endif
  46.  
  47. ghhgfx: ghh glad
  48. ifneq (,$(ghhgfx_config))
  49. @echo "==== Building ghhgfx ($(ghhgfx_config)) ===="
  50. @${MAKE} --no-print-directory -C ../external/libghhgfx -f Makefile config=$(ghhgfx_config)
  51. endif
  52.  
  53. cJSON:
  54. ifneq (,$(cJSON_config))
  55. @echo "==== Building cJSON ($(cJSON_config)) ===="
  56. @${MAKE} --no-print-directory -C ../external/cJSON -f Makefile config=$(cJSON_config)
  57. endif
  58.  
  59. game: ghh ghhgfx glad cJSON
  60. ifneq (,$(game_config))
  61. @echo "==== Building game ($(game_config)) ===="
  62. @${MAKE} --no-print-directory -C . -f game.make config=$(game_config)
  63. endif
  64.  
  65. clean:
  66. @${MAKE} --no-print-directory -C ../external/libghhgfx/external/libghh -f Makefile clean
  67. @${MAKE} --no-print-directory -C ../external/libghhgfx/external/glad -f Makefile clean
  68. @${MAKE} --no-print-directory -C ../external/libghhgfx -f Makefile clean
  69. @${MAKE} --no-print-directory -C ../external/cJSON -f Makefile clean
  70. @${MAKE} --no-print-directory -C . -f game.make clean
  71.  
  72. help:
  73. @echo "Usage: make [config=name] [target]"
  74. @echo ""
  75. @echo "CONFIGURATIONS:"
  76. @echo " debug"
  77. @echo " release"
  78. @echo ""
  79. @echo "TARGETS:"
  80. @echo " all (default)"
  81. @echo " clean"
  82. @echo " ghh"
  83. @echo " glad"
  84. @echo " ghhgfx"
  85. @echo " cJSON"
  86. @echo " game"
  87. @echo ""
  88. @echo "For more information, see https://github.com/premake/premake-core/wiki"
Advertisement
Add Comment
Please, Sign In to add comment