I have this Makefile and each line run OK separately, but when I do make
I get this error:
make: *** No rule to make target `CoalitionManipulation.cpp', needed by `CoalitionManipulation.o'. Stop.
But I can see the CoalitionManipulation.o
file, it means it exists!
Bere is the makefile:
CoalitionManipulation : CoalitionManipulation.o PrintQ3.o ChooseRandomBit.o
g++ -Wall -lm PrintQ3.o ChooseRandomBit.o CoalitionManipulation.o -o CoalitionManipulation
CoalitionManipulation.o : CoalitionManipulation.cpp ChooseRandomBit.h PrintQ3.h
g++ -Wall -c CoalitionManipulation.cpp -o CoalitionManipulation.o
PrintQ3.o : PrintQ3.h PrintQ3.cpp
g++ -Wall -c PrintQ3.cpp -o PrintQ3.o
ChooseRandomBit.o : ChooseRandomBit.cpp ChooseRandomBit.h
g++ -Wall -c ChooseRandomBit.cpp -o ChooseRandomBit.o
What is the problem?