PARAMS = -g -Wall -pedantic
PARAMS_FINAL = -O -Wall -pedantic

IntersectionSimulator: IntersectionSimulator.o
	g++ $(PARAMS) Car.o Direction.o FuzzyLogicController.o FuzzySet.o Rule.o RuleBase.o IntersectionSimulator.o -o IntersectionSimulator
	
IntersectionSimulator.o: IntersectionSimulator.cpp IntersectionSimulator.h
	g++ $(PARAMS) -c IntersectionSimulator.cpp
	
clean:
	del IntersectionSimulator.o
	del IntersectionSimulator.exe

final: IntersectionSimulator_final

IntersectionSimulator_final: IntersectionSimulator_final.o
	g++ $(PARAMS_FINAL) Car.o Direction.o FuzzyLogicController.o FuzzySet.o Rule.o RuleBase.o IntersectionSimulator.o -o IntersectionSimulator
	
IntersectionSimulator_final.o: IntersectionSimulator.cpp IntersectionSimulator.h
	g++ $(PARAMS_FINAL) -c IntersectionSimulator.cpp

Testers: RuleBaseTesterA RuleBaseTesterB

RuleBaseTesterA: RuleBaseTesterA.o
	g++ $(PARAMS_FINAL) RuleBaseTesterA.o -o RuleBaseTesterA

RuleBaseTesterA.o: RuleBaseTesterA.cpp
	g++ $(PARAMS_FINAL) -c RuleBaseTesterA.cpp

RuleBaseTesterB: RuleBaseTesterB.o
	g++ $(PARAMS_FINAL) RuleBaseTesterB.o -o RuleBaseTesterB

RuleBaseTesterB.o: RuleBaseTesterB.cpp
	g++ $(PARAMS_FINAL) -c RuleBaseTesterB.cpp

