title: Why does Makefile think it's up-to-date despite changes being made?
body: <p><strong>C Makefile</strong></p>
  
  <p>This question has a close duplicate, but I still can't fix my problem.</p>
  
  <p>I have the following Makefile:</p>
  
  <pre><code>CFLAGS0 = 
  CFLAGS1 = -O1
  CFLAGS2 = -O2
  CFLAGS3 = -O3
  CFLAGS4 = -O4
  
  mountain:   timer.o mountain.o
      gcc -o mountain timer.o mountain.o
  
  timer.o: timer.c timer.h
      gcc -c -O2 timer.c       
  
  mountain.o: mountain.c timer.h
      gcc -c $(CFLAGS1) mountain.c   #I'm trying to make changes here
  
  clean:
      rm *.o mountain
  </code></pre>
  
  <p>I'm trying to compile with different optimization levels by changing the flag. But when I try to make, I'm told that 'mountain' is up to date? What am I missing? Thanks.</p>