title: C Makefile trouble: "gcc: -lm: linker input file unused because linking not done mpicc -lm 3D-ELM.o -o 3D-ELM.exe"
body: <p>I'm having some trouble with a C Makefile.</p>
  
  <p>Here are the contents of the Makefile:</p>
  
  <pre><code>PROJECT = 3D-ELM
  MPICC = mpicc
  CLAGS = -g -O3
  LIBS = -lm
  SRC = src_el
  OBJECTS = $(PROJECT).o
  
  $(PROJECT).exe : $(OBJECTS)
          $(MPICC) $(CFLAGS) $(LIBS) $(OBJECTS) -o $(PROJECT).exe
  
  $(PROJECT).o : $(SRC)/$(PROJECT).c
          $(MPICC) $(CFLAGS) $(LIBS) -c $(SRC)/$(PROJECT).c
  
  clean:
          rm -rf *o $(PROJECT)
  </code></pre>
  
  <p>When I make, here is the error:</p>
  
  <blockquote>
    <p>gcc: -lm: linker input file unused because linking not done</p>
  </blockquote>
  
  <p>Does anyone know what's wrong?</p>
  
  <p>Many thanks in advance,</p>
  
  <hr>
  
  <p>EDIT: Got it. I don't need to pass libs when making the object file... Doh! <em>bangs head off desk</em></p>
  
  <p>Thanks for all your help guys,</p>