# GNU Make workspace makefile autogenerated by Premake

include config.gcc

ifndef config
  config=debug_x32
endif

ifndef verbose
  SILENT = @
endif

ifeq ($(config),debug_x32)
  wxsqlite3_config = debug_x32
  minimal_config = debug_x32
  treeview_config = debug_x32
endif
ifeq ($(config),debug_x64)
  wxsqlite3_config = debug_x64
  minimal_config = debug_x64
  treeview_config = debug_x64
endif
ifeq ($(config),release_x32)
  wxsqlite3_config = release_x32
  minimal_config = release_x32
  treeview_config = release_x32
endif
ifeq ($(config),release_x64)
  wxsqlite3_config = release_x64
  minimal_config = release_x64
  treeview_config = release_x64
endif
ifeq ($(config),debug_wxdll_x32)
  wxsqlite3_config = debug_wxdll_x32
  minimal_config = debug_wxdll_x32
  treeview_config = debug_wxdll_x32
endif
ifeq ($(config),debug_wxdll_x64)
  wxsqlite3_config = debug_wxdll_x64
  minimal_config = debug_wxdll_x64
  treeview_config = debug_wxdll_x64
endif
ifeq ($(config),release_wxdll_x32)
  wxsqlite3_config = release_wxdll_x32
  minimal_config = release_wxdll_x32
  treeview_config = release_wxdll_x32
endif
ifeq ($(config),release_wxdll_x64)
  wxsqlite3_config = release_wxdll_x64
  minimal_config = release_wxdll_x64
  treeview_config = release_wxdll_x64
endif
ifeq ($(config),dll_debug_x32)
  wxsqlite3_config = dll_debug_x32
  minimal_config = dll_debug_x32
  treeview_config = dll_debug_x32
endif
ifeq ($(config),dll_debug_x64)
  wxsqlite3_config = dll_debug_x64
  minimal_config = dll_debug_x64
  treeview_config = dll_debug_x64
endif
ifeq ($(config),dll_release_x32)
  wxsqlite3_config = dll_release_x32
  minimal_config = dll_release_x32
  treeview_config = dll_release_x32
endif
ifeq ($(config),dll_release_x64)
  wxsqlite3_config = dll_release_x64
  minimal_config = dll_release_x64
  treeview_config = dll_release_x64
endif

PROJECTS := wxsqlite3 minimal treeview

.PHONY: all clean help $(PROJECTS) 

all: $(PROJECTS)

wxsqlite3:
ifneq (,$(wxsqlite3_config))
	@echo "==== Building wxsqlite3 ($(wxsqlite3_config)) ===="
ifeq ($(wxMonolithic),1)
	@${MAKE} --no-print-directory -C . -f wxsqlite3_mono.make config=$(wxsqlite3_config) wxFlavour=$(wxFlavour)
else
	@${MAKE} --no-print-directory -C . -f wxsqlite3.make config=$(wxsqlite3_config) wxFlavour=$(wxFlavour)
endif
endif

minimal: wxsqlite3
ifneq (,$(minimal_config))
	@echo "==== Building minimal ($(minimal_config)) ===="
ifeq ($(wxMonolithic),1)
	@${MAKE} --no-print-directory -C . -f minimal_mono.make config=$(minimal_config) wxFlavour=$(wxFlavour)
else
	@${MAKE} --no-print-directory -C . -f minimal.make config=$(minimal_config) wxFlavour=$(wxFlavour)
endif
endif

treeview: wxsqlite3
ifneq (,$(treeview_config))
	@echo "==== Building treeview ($(treeview_config)) ===="
ifeq ($(wxMonolithic),1)
	@${MAKE} --no-print-directory -C . -f treeview_mono.make config=$(treeview_config) wxFlavour=$(wxFlavour)
else
	@${MAKE} --no-print-directory -C . -f treeview.make config=$(treeview_config) wxFlavour=$(wxFlavour)
endif
endif

clean:
ifeq ($(wxMonolithic),1)
	@${MAKE} --no-print-directory -C . -f wxsqlite3_mono.make clean
	@${MAKE} --no-print-directory -C . -f minimal_mono.make clean
	@${MAKE} --no-print-directory -C . -f treeview_mono.make clean
else
	@${MAKE} --no-print-directory -C . -f wxsqlite3.make clean
	@${MAKE} --no-print-directory -C . -f minimal.make clean
	@${MAKE} --no-print-directory -C . -f treeview.make clean
endif

help:
	@echo "Usage: make [config=name] [target]"
	@echo ""
	@echo "CONFIGURATIONS:"
	@echo "  debug_x32"
	@echo "  debug_x64"
	@echo "  release_x32"
	@echo "  release_x64"
	@echo "  debug_wxdll_x32"
	@echo "  debug_wxdll_x64"
	@echo "  release_wxdll_x32"
	@echo "  release_wxdll_x64"
	@echo "  dll_debug_x32"
	@echo "  dll_debug_x64"
	@echo "  dll_release_x32"
	@echo "  dll_release_x64"
	@echo ""
	@echo "TARGETS:"
	@echo "   all (default)"
	@echo "   clean"
	@echo "   wxsqlite3"
	@echo "   minimal"
	@echo "   treeview"
	@echo ""
	@echo "For more information, see http://industriousone.com/premake/quick-start"