


SOLUTIONDIR := $(shell pwd)
export SOLUTIONDIR

CONFIG ?= DebugWithReleaseLibs
CONFIGS := DebugWithReleaseLibs Debug Release Optimized 
PROJECTS := SimRobotCore SimRobotGUI Controller Simulator URC SpecialActions Behavior Nao SimulatorDoc BehaviorDoc 
PROJECTCONFIGS := SimRobotCore_DebugWithReleaseLibs SimRobotGUI_DebugWithReleaseLibs Controller_DebugWithReleaseLibs Simulator_DebugWithReleaseLibs URC_DebugWithReleaseLibs SpecialActions_DebugWithReleaseLibs Behavior_DebugWithReleaseLibs Nao_DebugWithReleaseLibs SimulatorDoc_DebugWithReleaseLibs BehaviorDoc_DebugWithReleaseLibs SimRobotCore_Debug SimRobotGUI_Debug Controller_Debug Simulator_Debug URC_Debug SpecialActions_Debug Behavior_Debug Nao_Debug SimulatorDoc_Debug BehaviorDoc_Debug SimRobotCore_Release SimRobotGUI_Release Controller_Release Simulator_Release URC_Release SpecialActions_Release Behavior_Release Nao_Release SimulatorDoc_Release BehaviorDoc_Release SimRobotCore_Optimized SimRobotGUI_Optimized Controller_Optimized Simulator_Optimized URC_Optimized SpecialActions_Optimized Behavior_Optimized Nao_Optimized SimulatorDoc_Optimized BehaviorDoc_Optimized 

.PHONY: all clean $(CONFIGS) $(PACKAGES) $(PACKAGECONFIGS)

all: $(CONFIG)

prebuild:
#	@echo "------ Regenerating Makefiles ------"
	-@../Src/SimulatorQt/Util/zbuildgen/bin/zbuildgen . Behavior Documentation ../Src/SimulatorQt/MakeQt/SimRobotCore.make.zbuild ../Src/SimulatorQt/MakeQt/SimRobotGUI.make.zbuild ../Src/SimulatorQt/MakeQt/SimRobotCore.vcproj.zbuild ../Src/SimulatorQt/MakeQt/SimRobotGUI.vcproj.zbuild --platform linux > /dev/null

DebugWithReleaseLibs: SimRobotCore_DebugWithReleaseLibs SimRobotGUI_DebugWithReleaseLibs Controller_DebugWithReleaseLibs Simulator_DebugWithReleaseLibs URC_DebugWithReleaseLibs SpecialActions_DebugWithReleaseLibs Behavior_DebugWithReleaseLibs Nao_DebugWithReleaseLibs 

SimRobotCore_DebugWithReleaseLibs: prebuild 
	@$(MAKE) -j 2 --no-print-directory -C ../Src/SimulatorQt/MakeQt/ -f SimRobotCore.make Release

SimRobotGUI_DebugWithReleaseLibs: prebuild SimRobotCore_DebugWithReleaseLibs 
	@$(MAKE) -j 2 --no-print-directory -C ../Src/SimulatorQt/MakeQt/ -f SimRobotGUI.make Release

Controller_DebugWithReleaseLibs: prebuild 
	@$(MAKE) -j 2 --no-print-directory  -f Controller.make Release

Simulator_DebugWithReleaseLibs: prebuild SimRobotGUI_DebugWithReleaseLibs Controller_DebugWithReleaseLibs SpecialActions_DebugWithReleaseLibs Behavior_DebugWithReleaseLibs 
	@$(MAKE) -j 2 --no-print-directory  -f Simulator.make DebugWithReleaseLibs

URC_DebugWithReleaseLibs: prebuild 
	@$(MAKE) -j 2 --no-print-directory  -f URC.make Debug

SpecialActions_DebugWithReleaseLibs: prebuild URC_DebugWithReleaseLibs 
	@$(MAKE) -j 2 --no-print-directory  -f SpecialActions.make Release

Behavior_DebugWithReleaseLibs: prebuild URC_DebugWithReleaseLibs 
	@$(MAKE) -j 2 --no-print-directory  -f Behavior.make Release

Nao_DebugWithReleaseLibs: prebuild 
	@$(MAKE)  --no-print-directory  -f Nao.make Debug

SimulatorDoc_DebugWithReleaseLibs: prebuild 
	@$(MAKE) -j 2 --no-print-directory -C Documentation -f SimulatorDoc.make Release

BehaviorDoc_DebugWithReleaseLibs: prebuild 
	@$(MAKE) -j 1 --no-print-directory -C Documentation -f BehaviorDoc.make Release

Debug: SimRobotCore_Debug SimRobotGUI_Debug Controller_Debug Simulator_Debug URC_Debug SpecialActions_Debug Behavior_Debug Nao_Debug 

SimRobotCore_Debug: prebuild 
	@$(MAKE) -j 2 --no-print-directory -C ../Src/SimulatorQt/MakeQt/ -f SimRobotCore.make Debug

SimRobotGUI_Debug: prebuild SimRobotCore_Debug 
	@$(MAKE) -j 2 --no-print-directory -C ../Src/SimulatorQt/MakeQt/ -f SimRobotGUI.make Debug

Controller_Debug: prebuild 
	@$(MAKE) -j 2 --no-print-directory  -f Controller.make Debug

Simulator_Debug: prebuild SimRobotGUI_Debug Controller_Debug SpecialActions_Debug Behavior_Debug 
	@$(MAKE) -j 2 --no-print-directory  -f Simulator.make Debug

URC_Debug: prebuild 
	@$(MAKE) -j 2 --no-print-directory  -f URC.make Debug

SpecialActions_Debug: prebuild URC_Debug 
	@$(MAKE) -j 2 --no-print-directory  -f SpecialActions.make Release

Behavior_Debug: prebuild URC_Debug 
	@$(MAKE) -j 2 --no-print-directory  -f Behavior.make Release

Nao_Debug: prebuild 
	@$(MAKE)  --no-print-directory  -f Nao.make Debug

SimulatorDoc_Debug: prebuild 
	@$(MAKE) -j 2 --no-print-directory -C Documentation -f SimulatorDoc.make Release

BehaviorDoc_Debug: prebuild 
	@$(MAKE) -j 1 --no-print-directory -C Documentation -f BehaviorDoc.make Release

Release: SimRobotCore_Release SimRobotGUI_Release Controller_Release Simulator_Release URC_Release SpecialActions_Release Behavior_Release Nao_Release 

SimRobotCore_Release: prebuild 
	@$(MAKE) -j 2 --no-print-directory -C ../Src/SimulatorQt/MakeQt/ -f SimRobotCore.make Release

SimRobotGUI_Release: prebuild SimRobotCore_Release 
	@$(MAKE) -j 2 --no-print-directory -C ../Src/SimulatorQt/MakeQt/ -f SimRobotGUI.make Release

Controller_Release: prebuild 
	@$(MAKE) -j 2 --no-print-directory  -f Controller.make Release

Simulator_Release: prebuild SimRobotGUI_Release Controller_Release SpecialActions_Release Behavior_Release 
	@$(MAKE) -j 2 --no-print-directory  -f Simulator.make Optimized

URC_Release: prebuild 
	@$(MAKE) -j 2 --no-print-directory  -f URC.make Debug

SpecialActions_Release: prebuild URC_Release 
	@$(MAKE) -j 2 --no-print-directory  -f SpecialActions.make Release

Behavior_Release: prebuild URC_Release 
	@$(MAKE) -j 2 --no-print-directory  -f Behavior.make Release

Nao_Release: prebuild 
	@$(MAKE)  --no-print-directory  -f Nao.make Release

SimulatorDoc_Release: prebuild 
	@$(MAKE) -j 2 --no-print-directory -C Documentation -f SimulatorDoc.make Release

BehaviorDoc_Release: prebuild 
	@$(MAKE) -j 1 --no-print-directory -C Documentation -f BehaviorDoc.make Release

Optimized: SimRobotCore_Optimized SimRobotGUI_Optimized Controller_Optimized Simulator_Optimized URC_Optimized SpecialActions_Optimized Behavior_Optimized Nao_Optimized 

SimRobotCore_Optimized: prebuild 
	@$(MAKE) -j 2 --no-print-directory -C ../Src/SimulatorQt/MakeQt/ -f SimRobotCore.make Release

SimRobotGUI_Optimized: prebuild SimRobotCore_Optimized 
	@$(MAKE) -j 2 --no-print-directory -C ../Src/SimulatorQt/MakeQt/ -f SimRobotGUI.make Release

Controller_Optimized: prebuild 
	@$(MAKE) -j 2 --no-print-directory  -f Controller.make Release

Simulator_Optimized: prebuild SimRobotGUI_Optimized Controller_Optimized SpecialActions_Optimized Behavior_Optimized 
	@$(MAKE) -j 2 --no-print-directory  -f Simulator.make Optimized

URC_Optimized: prebuild 
	@$(MAKE) -j 2 --no-print-directory  -f URC.make Debug

SpecialActions_Optimized: prebuild URC_Optimized 
	@$(MAKE) -j 2 --no-print-directory  -f SpecialActions.make Release

Behavior_Optimized: prebuild URC_Optimized 
	@$(MAKE) -j 2 --no-print-directory  -f Behavior.make Release

Nao_Optimized: prebuild 
	@$(MAKE)  --no-print-directory  -f Nao.make Optimized

SimulatorDoc_Optimized: prebuild 
	@$(MAKE) -j 2 --no-print-directory -C Documentation -f SimulatorDoc.make Release

BehaviorDoc_Optimized: prebuild 
	@$(MAKE) -j 1 --no-print-directory -C Documentation -f BehaviorDoc.make Release


SimRobotCore: SimRobotCore_$(CONFIG)

SimRobotGUI: SimRobotGUI_$(CONFIG)

Controller: Controller_$(CONFIG)

Simulator: Simulator_$(CONFIG)

URC: URC_$(CONFIG)

SpecialActions: SpecialActions_$(CONFIG)

Behavior: Behavior_$(CONFIG)

Nao: Nao_$(CONFIG)

SimulatorDoc: SimulatorDoc_$(CONFIG)

BehaviorDoc: BehaviorDoc_$(CONFIG)


clean: prebuild
	@echo "------ Cleaning ------"
	@$(MAKE) --no-print-directory -C ../Src/SimulatorQt/MakeQt/ -f SimRobotCore.make clean
	@$(MAKE) --no-print-directory -C ../Src/SimulatorQt/MakeQt/ -f SimRobotGUI.make clean
	@$(MAKE) --no-print-directory  -f Controller.make clean
	@$(MAKE) --no-print-directory  -f Simulator.make clean
	@$(MAKE) --no-print-directory  -f URC.make clean
	@$(MAKE) --no-print-directory  -f SpecialActions.make clean
	@$(MAKE) --no-print-directory  -f Behavior.make clean
	@$(MAKE) --no-print-directory  -f Nao.make clean
	@$(MAKE) --no-print-directory -C Documentation -f SimulatorDoc.make clean
	@$(MAKE) --no-print-directory -C Documentation -f BehaviorDoc.make clean

