I am trying to write a makefile for a school project.
When I type:
g++ -o simulator simulator.cpp
I get the output:
simulator
Which is what I want. In my makefile I've typed:
# The target
simulator : simulator.cpp
g++ -o simulator simulator.cpp
# To generate the class files
simulator.o : simulator.cpp
g++ -c simulator.cpp
# clean out the dross
clean:
rm simulator.o
But it doesn't work and I've no idea how to make it work I've searched forums and google and can't find out what's wrong.
Currently I'm getting the error:
'ake: Fatal error: Don't know how to make target `simulator.cpp
Any help would be greatly appreciated.
-Robb
When I type:
g++ -o simulator simulator.cpp
I get the output:
simulator
Which is what I want. In my makefile I've typed:
# The target
simulator : simulator.cpp
g++ -o simulator simulator.cpp
# To generate the class files
simulator.o : simulator.cpp
g++ -c simulator.cpp
# clean out the dross
clean:
rm simulator.o
But it doesn't work and I've no idea how to make it work I've searched forums and google and can't find out what's wrong.
Currently I'm getting the error:
'ake: Fatal error: Don't know how to make target `simulator.cpp
Any help would be greatly appreciated.
-Robb