title: makefile - make: *** No rule to make target all'. Stop
body: <p>i have been trying to make a correct makefile for a while now but i keep getting the error "make: *** No rule to make target `all'.  Stop."</p>
  
  <p>i have one main program: mpasswdsort.c 
  and the c file wich is used by mpasswdsort, it comes with a header as well:
  list.c and list.h</p>
  
  <p>my makefile:</p>
  
  <pre><code>CC=gcc
  CFLAGS=-Wall -pedantic -ansi
  all: mpasswdsort
  server: mpasswdsort.o list.o
      $(CC) mpasswdsort.o list.o -o mpasswdsort
  mpasswdsort.o: mpasswdsort.cpp
      $(CC) $(CFLAGS) mpasswdsort.cpp
  list.o: list.cpp
       $(CC) $(CFLAGS) list.cpp
  clean:
      rm -f server client *.o core
  </code></pre>
  
  <p>I am unsure if its wrong in the makefile or if the makefil isnt supposed to be a .txt file.</p>