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: doublefree clean: rm -f *.o doublefree .cpp.o: $(CXX) $(CFLAGS) $(INCPATH) -c -o $@ $< doublefree: doublefree.o point.o $(CXX) $(CFLAGS) $(INCPATH) -o $@ $? $(LIBPATH) $(LIBS)