# GNU Make workspace makefile autogenerated by Premake

ifndef config
  config=debug_native
endif

ifndef verbose
  SILENT = @
endif

ifeq ($(config),debug_native)
  tess2_config = debug_native
  example_config = debug_native
endif
ifeq ($(config),debug_x64)
  tess2_config = debug_x64
  example_config = debug_x64
endif
ifeq ($(config),debug_x32)
  tess2_config = debug_x32
  example_config = debug_x32
endif
ifeq ($(config),release_native)
  tess2_config = release_native
  example_config = release_native
endif
ifeq ($(config),release_x64)
  tess2_config = release_x64
  example_config = release_x64
endif
ifeq ($(config),release_x32)
  tess2_config = release_x32
  example_config = release_x32
endif

PROJECTS := tess2 example

.PHONY: all clean help $(PROJECTS) 

all: $(PROJECTS)

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

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

clean:
	@${MAKE} --no-print-directory -C . -f tess2.make clean
	@${MAKE} --no-print-directory -C . -f example.make clean

help:
	@echo "Usage: make [config=name] [target]"
	@echo ""
	@echo "CONFIGURATIONS:"
	@echo "  debug_native"
	@echo "  debug_x64"
	@echo "  debug_x32"
	@echo "  release_native"
	@echo "  release_x64"
	@echo "  release_x32"
	@echo ""
	@echo "TARGETS:"
	@echo "   all (default)"
	@echo "   clean"
	@echo "   tess2"
	@echo "   example"
	@echo ""
	@echo "For more information, see http://industriousone.com/premake/quick-start"