CXX = g++ CFLAGS = -Wall -g ifeq ($(shell uname), Darwin) LIBS = -framework GLUT -framework OpenGL -framework Cocoa else LIBS = -lglut -lGL -lGLU endif FREEGLUT = /afs/nd.edu/user37/ccl/software/external/freeglut ifneq "$(wildcard $(FREEGLUT))" "" INCPATH = -I$(FREEGLUT)/include LIBPATH = -L$(FREEGLUT)/lib endif all: primitives clean: rm -f *.o primitives .cc.o: $(CXX) $(CFLAGS) $(INCPATH) -c -o $@ $< primitives: primitives.o color.h $(CXX) $(CFLAGS) $(INCPATH) -o $@ $< $(LIBPATH) $(LIBS)