CC=g++ CFLAGS= LDFLAGS=-lGL -lglut -lGLU -L/usr/X11R6/lib -lX11 -lXi -lXmu -lm -ljpeg TARGET= trackball.cpp sgi.cpp parser.cpp cartoon_main.cpp utils.cpp facet.cpp cartoon_travail.cpp OBJ= $(TARGET:.c=.o) all: run run: $(OBJ) $(CC) -o $@ $^ $(LDFLAGS) %.o: %.c $(CC) -o $@ -c $< $(CFLAGS) %.o: %.cpp $(CC) -o $@ -c $< $(CFLAGS)