# n-body problem for cs-487 / ee-599 # # November, 2000 # LPATH tells the linker where to find libraries LPATH = -L/usr/X11R6/lib # 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. XLIBS = -lX11 -lXext # MISCLIBS are miscellaneous libs that are needed by the linker. # -lm denotes the math library. MISCLIBS = -lm # PVM libraries go here PVMLIBS = LIBS = $(LPATH) $(GLLIBS) $(XLIBS) $(MISCLIBS) $(PVMLIBS) # compiler CC = gcc # compiler flags: # -g tells the compiler to produce symbolic information that a debugger # (like gdb) needs. # -Wall tells the compiler to print warnings about pretty much everything. # -pedantic checks that our code is portable to other C compilers # -Ox Optimize at level x # for debugging: CFLAGS = -g -Wall -pedantic # for speed: #CFLAGS = -O2 -Wall all : bird_tester bird.o : bird.h bird.c bird_renderer.h vector.h bird_renderer.o : bird_renderer.c bird_renderer.h vector.h bird_tester.o : bird_tester.c bird_renderer.h vector.h vector.o : vector.c vector.h bird_tester : bird_renderer.o bird_tester.o bird.o vector.o $(CC) $(CFLAGS) -o bird_tester bird_tester.o bird_renderer.o \ bird.o vector.o $(LIBS) clean : rm -f bird_tester *.o core *~ # The default way to convert .c files into .o files. .c.o: ; $(CC) -c $(CFLAGS) $(IPATH) $<