Hello everyone! I have a problem about Makefile flags. It begins with that I cannot get the exact meaning of my task: "The compiler flags -o0(letter o and digit 0), -o1, -o2, and -o3 set the level of optimization from none to highest. Write a makefile that automatically generates four different programs matmul-o0, matmul-o1, matmul-o2, and matmul-o3 which are compiled using the respectively options. Make sure you also use -Wall." And where matmul.cc is given, but it is a file that with some mistakes. Firstly, I used submakefiles to generate programs with different flags, but the -o0 to -o3 didn't work. Then I tried to generates the programs in one makefile as:
Oh! It works!!! Thank you soooo much!!!!!!!!!!!! @long double main
I should read my material carefully and make sure about the meaning of "FLAGS"...
Thank you again! And happy New Year!
Yes, I wrote linking and compilation in the same line then. And I think my mistake was using the small letter o. And would you please tell me the details of "echo" in makefile?