# # 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 open lab Debian linux machines. # # Kobus. # # LPATH tells the linker where to find libraries (default locations work OK) LPATH = -L/home/cs433/fall03/lib/linux_386 # IPATH tells the compiler where to look for include files(default locations OK). IPATH = -I/home/cs433/fall03/include/linux_386 # 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 = # MISCLIBS are miscellaneous libs that are needed by the linker. # -lm denotes the math library. MISCLIBS = -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 = -c -g -Wall -Wmissing-prototypes -W # 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 TRIANGLE_OBS = triangle.o all : triangle triangle : triangle.o $(LD) $(LFLAGS) -o $@ $(TRIANGLE_OBS) $(LIBS) # The default way to convert .c files into .o files. .c.o: ; $(CC) $(CFLAGS) $(IPATH) $< clean: $(RM) $(TRIANGLE_OBS) triangle