make is giving error make: *** No rule to make target `clean'. Stop

12,961

MakeFile should be named Makefile. Remove the capital F.

Share:
12,961

Related videos on Youtube

g.revolution
Author by

g.revolution

i m a geek :d SOreadytohelp

Updated on September 23, 2022

Comments

  • g.revolution
    g.revolution over 1 year

    Hi I have a simple MakeFile that contains this in it:

    clean:
        rm -f ex1
    

    but when i run command make clean, i get the following error:

    make: *** No rule to make target `clean'.  Stop.
    

    I am not sure what I am doing wrong, its only 2 lines and the 2nd line is started with a TAB not Spaces. anybody have any idea? I am on Mac OS X 10.9.2

    and I am actually trying to learn c and following this tutorial :http://c.learncodethehardway.org/book/ex2.html

  • g.revolution
    g.revolution about 10 years
    awesome , it worked. still 11 minutes to go before i accept the answer.
  • andrea.marangoni
    andrea.marangoni about 10 years
    actually the name could be even MakeFile. Just you have to call make with -f param.