Make clean why wrong?

Makefile are as follows:
        g++ hello.cpp -o hello
        g++ hello.cpp
        rm *.o hello a.out

After running the make clean running make, why the error?
How to modify the Makefile to make make clean without error.?

The error message is shown as follows:

make clean
rm *.o hello a.out
rm: cannot remove '*.o: No such file or directory
rm: cannot remove 'a.out: No such file or directory
make: *** [clean] Error 1

Started by Atwood at November 13, 2016 - 1:18 AM

RM -f.

Posted by Ken at November 18, 2016 - 1:38 AM

Google told me to write Makefile

Posted by Chelsea at November 20, 2016 - 1:48 AM

Automake, also need to see Makefile.?

Posted by Atwood at December 01, 2016 - 2:07 AM

Linux, makefile must be.

Posted by Chelsea at December 04, 2016 - 3:06 AM

Rm with the -f option, so, if you want to delete the file does not exist, not prompted error.

Posted by Merlin at December 16, 2016 - 3:44 AM

Meow familiar with automake.?
Feel the goods more trouble. .

Posted by Atwood at December 31, 2016 - 4:02 AM

rm -rf

Posted by Cornelius at January 03, 2017 - 5:16 AM

Plus, the error can be overlooked´Ż×
@rm ...

Posted by Osmond at January 04, 2017 - 4:16 AM

RM *.o Hello a.out to

@rm -f *.o hello a.out

Posted by Beacher at January 10, 2017 - 4:05 AM

Why add@ ?

Posted by Atwood at January 13, 2017 - 4:10 AM