title: Why is make complaining about circular dependencies?
body: <p>I have built a make file for my project, and it works (everything compiles) but it gives these irritating error messages:</p>
  
  <pre><code>make: Circular zpr.c &lt;- zpr.o dependency dropped.
  gcc -Wall   -c -o zpr.o zpr.c
  make: Circular readjpeg.c &lt;- readjpeg.o dependency dropped.
  gcc -Wall   -c -o readjpeg.o readjpeg.c
  make: Circular readppm.c &lt;- readppm.o dependency dropped.
  gcc -Wall   -c -o readppm.o readppm.c
  make: Circular SceneNode.cpp &lt;- SceneNode.o dependency dropped.
  g++    -c -o SceneNode.o SceneNode.cpp
  make: Circular BoundingBoxNode.cpp &lt;- BoundingBoxNode.o dependency dropped.
  g++    -c -o BoundingBoxNode.o BoundingBoxNode.cpp
  make: Circular GeometryNode.cpp &lt;- GeometryNode.o dependency dropped.
  g++    -c -o GeometryNode.o GeometryNode.cpp
  make: Circular SceneGraph.cpp &lt;- SceneGraph.o dependency dropped.
  g++    -c -o SceneGraph.o SceneGraph.cpp
  make: Circular testgraph.cpp &lt;- testgraph.o dependency dropped.
  g++    -c -o testgraph.o testgraph.cpp
  </code></pre>
  
  <p>My makefile is not complicated at all so hopefully someone can spot the error.</p>
  
  <pre><code>GXX=g++
  CC=gcc
  CFLAGS=-Wall
  
  LIBS=-lGL -lglut -ljpeg
  
  OBJS=helpers.o loadobj.o zpr.o readjpeg.o readppm.o SceneNode.o BoundingBoxNode.o GeometryNode.o SceneGraph.o  testgraph.o
  OBJS2=testgraph.o SceneGraph.o GeometryNode.o BoundingBox.o SceneNode.o readppm.o readjpeg.o zpr.o loadobj.o helpers.o
  SRCS=testgraph.cpp SceneGraph.cpp SceneNode.cpp
  
  .o.cpp:
      $(GXX) $(CFLAGS) -c $&lt;
  
  .o.c:
      $(CC) $(CFLAGS) -c $&lt;
  
  testgraph: $(OBJS)
      $(GXX) $(LIBS) $(OBJS) -o testgraph
  
  clean:
      rm *.o
  </code></pre>