# # This Makefile is adopted from # http://www.cs.arizona.edu/classes/cs433/spring02/opengl/code/Makefile # # I have adjusted it so that it works on the grapics lab Red Hat Linux machines. # This mostly involved erasing stuff, since OpenGL is installed in a relatively # standard place on those machines. # # Kobus. # # LPATH tells the linker where to find libraries (default locations work OK in # graphics lab) LPATH = -L/usr/X11R6/lib -L/home/kobus/load/linux_386_p4 # IPATH tells the compiler where to look for include files(default locations OK # in graphics lab (and elsewhere?)). IPATH = -I/home/kobus/include/kjb # GLLIBS are the GLUT and OpenGL (or Mesa) libraries needed by the linker. GLLIBS = -lglut -lGLU -lGL # XLIBS are the X libraries needed by the linker because GLUT and OpenGL # call X routines (not needed on graphics lab linux machines). XLIBS = -lXi -lXmu # MISCLIBS are miscellaneous libs that are needed by the linker. # -lm denotes the math library. MISCLIBS = -lKJB -lcurses -lm LIBS = $(LPATH) $(GLLIBS) $(XLIBS) $(MISCLIBS) # compiler CC = gcc # compiler flags: # -c tells the compiler to only compile (don't link). # -g tells the compiler to produce symbolic information that a debugger # (like gdb) needs. # "-Wall -Wmissing-prototypes -W" specifies which warnings we want CFLAGS = -ansi -c -g -Wall -Wmissing-prototypes -W -DLINUX_386 -DLINUX_386_P4 # linker--let gcc pass it on to the right place LD = gcc # linker flags: # -g tells the compiler to produce symbolic information that a debugger # (like gdb) needs. LFLAGS = -g # delete command RM = -/bin/rm -f MATRIX_OBS = matrix.o all : matrix matrix : matrix.o $(LD) $(LFLAGS) -o $@ $(MATRIX_OBS) $(LIBS) # The default way to convert .c files into .o files. .c.o: ; $(CC) -c $(CFLAGS) $(IPATH) $< clean: $(RM) $(MATRIX_OBS) matrix