I have built a make file for my project, and it works (everything compiles) but it gives these irritating error messages:
make: Circular zpr.c <- zpr.o dependency dropped.
gcc -Wall -c -o zpr.o zpr.c
make: Circular readjpeg.c <- readjpeg.o dependency dropped.
gcc -Wall -c -o readjpeg.o readjpeg.c
make: Circular readppm.c <- readppm.o dependency dropped.
gcc -Wall -c -o readppm.o readppm.c
make: Circular SceneNode.cpp <- SceneNode.o dependency dropped.
g++ -c -o SceneNode.o SceneNode.cpp
make: Circular BoundingBoxNode.cpp <- BoundingBoxNode.o dependency dropped.
g++ -c -o BoundingBoxNode.o BoundingBoxNode.cpp
make: Circular GeometryNode.cpp <- GeometryNode.o dependency dropped.
g++ -c -o GeometryNode.o GeometryNode.cpp
make: Circular SceneGraph.cpp <- SceneGraph.o dependency dropped.
g++ -c -o SceneGraph.o SceneGraph.cpp
make: Circular testgraph.cpp <- testgraph.o dependency dropped.
g++ -c -o testgraph.o testgraph.cpp
My makefile is not complicated at all so hopefully someone can spot the error.
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 $<
.o.c:
$(CC) $(CFLAGS) -c $<
testgraph: $(OBJS)
$(GXX) $(LIBS) $(OBJS) -o testgraph
clean:
rm *.o