# Alternative GNU Make workspace makefile autogenerated by Premake

ifndef config
  config=debug
endif

ifndef verbose
  SILENT = @
endif

ifeq ($(config),debug)
  game_test_config = debug
  game_sword_config = debug
  music_test_config = debug

else ifeq ($(config),release)
  game_test_config = release
  game_sword_config = release
  music_test_config = release

else
  $(error "invalid configuration $(config)")
endif

PROJECTS := game_test game_sword music_test

.PHONY: all clean help $(PROJECTS) 

all: $(PROJECTS)

game_test:
ifneq (,$(game_test_config))
	@echo "==== Building game_test ($(game_test_config)) ===="
	@${MAKE} --no-print-directory -C . -f game_test.make config=$(game_test_config)
endif

game_sword:
ifneq (,$(game_sword_config))
	@echo "==== Building game_sword ($(game_sword_config)) ===="
	@${MAKE} --no-print-directory -C . -f game_sword.make config=$(game_sword_config)
endif

music_test:
ifneq (,$(music_test_config))
	@echo "==== Building music_test ($(music_test_config)) ===="
	@${MAKE} --no-print-directory -C . -f music_test.make config=$(music_test_config)
endif

clean:
	@${MAKE} --no-print-directory -C . -f game_test.make clean
	@${MAKE} --no-print-directory -C . -f game_sword.make clean
	@${MAKE} --no-print-directory -C . -f music_test.make clean

help:
	@echo "Usage: make [config=name] [target]"
	@echo ""
	@echo "CONFIGURATIONS:"
	@echo "  debug"
	@echo "  release"
	@echo ""
	@echo "TARGETS:"
	@echo "   all (default)"
	@echo "   clean"
	@echo "   game_test"
	@echo "   game_sword"
	@echo "   music_test"
	@echo ""
	@echo "For more information, see https://github.com/premake/premake-core/wiki"