GZ_TEST_LIB_SRCS += \
./Source/simulatorModule/gzTests/LRAUVController.cpp

GZ_TEST_LIB_OBJS += \
./Source/simulatorModule/gzTests/LRAUVController.o

GZ_TEST_LIB_DEPS += \
./Source/simulatorModule/gzTests/LRAUVController.d

GT_TEST_OBJS += \
./Source/simulatorModule/gzTests/DepthVBSMission_Test.o \
./Source/simulatorModule/gzTests/YoYoCircleMission_Test.o \
./Source/simulatorModule/gzTests/PitchMassMission_Test.o \
./Source/simulatorModule/gzTests/PitchAndDepthMassVBSMission_Test.o

GZ_TEST_DEPS += \
./Source/simulatorModule/gzTests/DepthVBSMission_Test.d \
./Source/simulatorModule/gzTests/YoYoCircleMission_Test.d \
./Source/simulatorModule/gzTests/PitchMassMission_Test.d \
./Source/simulatorModule/gzTests/PitchAndDepthMassVBSMission_Test.d

GZ_TEST_EXECUTABLES += \
../bin/LRAUV_DepthVBSMission_Test \
../bin/LRAUV_YoYoCircleMission_Test \
../bin/LRAUV_PitchMassMission_Test \
../bin/LRAUV_PitchAndDepthMassVBSMission_Test

CPP_DEPS += $(GZ_TEST_DEPS) $(GZ_TEST_LIB_DEPS)
CLEAN_OBJS += $(GZ_TEST_OBJS) $(GZ_TEST_LIB_OBJS)
EXECUTABLES += $(GZ_TEST_EXECUTABKES)

Source/simulatorModule/gzTests/%.o: ../Source/simulatorModule/gzTests/%.cpp
	@echo 'Building file: $<'
	@echo 'Invoking: GCC C++ Compiler'
	$(CXX) -I"../Source" -I"../Source/simulatorModule/gzTests" $(OPT_DBG_FLAGS) \
		-Wall -c $(CFLAGS) -D PROJECT_PATH=\"$(PROJECTDIR)\" -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" \
        -MT"$(@:%.o=%.d)" -o "$@" "$<"
	@echo 'Finished building: $<'
	@echo ' '

Source/simulatorModule/gzTests/%_Test.o: ../Source/simulatorModule/gzTests/%_Test.h
	@echo 'Building target: $@'
	@echo 'Running cxxtestgen.py: $(@:%.o=%.cpp)'
	../Tools/cxxtest/cxxtestgen.py -o "$(@:%.o=%.cpp)" --runner=StderrPrinter $<
	@echo 'Building file: $<'
	@echo 'Invoking: GCC C++ Compiler'
	$(CXX) $(FPICFLAG) -I"../Source" -I"../Tools/cxxtest" -I"../Source/simulatorModule/gzTests" \
		$(OPT_DBG_FLAGS) -Wall -c $(CFLAGS) -D PROJECT_PATH=\"$(PROJECTDIR)\" -fmessage-length=0 \
        -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$(@:%.o=%.cpp)"
	@echo 'Finished building target: $@'
	@echo ' '

../bin/LRAUV_%_Test: Source/simulatorModule/gzTests/%_Test.o $(GZ_TEST_LIB_OBJS)
	@echo 'Building target: $@'
	@echo 'Invoking: GCC C++ Linker'
	$(CXX) -o "$@" $(EXPORT_OPT) $^ $(LIBS)
	@echo 'Finished building target: $@'
	@echo ' '

test-gazebo: init ../bin/LRAUV $(GZ_TEST_EXECUTABLES)
	@for executable in $(GZ_TEST_EXECUTABLES); do \
		$$executable || exit 1; \
	done
