title: How to deal with Makefile error: make: *** [Makefile:11: test] Error 3
body: <p>I'm trying to build a Makefile for my code and for some reason I'm getting</p>
  <blockquote>
  <p>./ex2_q1 11 24 36 7 5</p>
  </blockquote>
  <blockquote>
  <p>There were 3 prime numbers</p>
  </blockquote>
  <blockquote>
  <p>make: *** [Makefile:11: test] Error 3</p>
  </blockquote>
  <p>The second line is the output of the program.
  Everything seems to work Ok but I don't know why I'm getting the error.</p>
  <p>the Makefile is:</p>
  <pre><code>PROG = ex2_q1
  
  all: test
  
  test: ex2_q1
      ./ex2_q1 11 24 36 7 5
  
  factors.o: factors.c
      gcc -Wall -c factors.c
  
  ex2_q1.o: ex2_q1.c
      gcc -Wall -c ex2_q1.c
  
  clean: 
      rm -vf *.o $(PROG)
      rm -vf *.o factors
      rm -vf *.txt
      rm -vf *.log
  
  factors: factors.o
      gcc -o factors -Wall factors.o
  
  ex2_q1: ex2_q1.o factors
      gcc -o ex2_q1 -Wall ex2_q1.o
  </code></pre>