-#Makefile for nbody program - single threaded version
-
+# Makefile for nbody program
+# Compiles on Ubuntu 12.04 and Debian 6.0.4
+# NOTE: This file is identical for both the single-threaded and multi-threaded versions of the program
CXX = gcc
-LIBRARIES = -lm -lGL -lglut -lGLU
+LIBRARIES = -lm -lGL -lglut -lGLU -lpthread
FLAGS = --std=c99 -Wall -pedantic -g
-PREPROCESSOR_FLAGS =
+PREPROCESSOR_FLAGS = -fopenmp
SINGLE_THREAD_OBJ = main.o nbody.o graphics.o
LINK_OBJ = main.o nbody.o graphics.o
BIN = nbody
$(BIN) : $(LINK_OBJ)
- $(CXX) -o $(BIN) $(LINK_OBJ) $(LIBRARIES)
+ $(CXX) -o $(BIN) $(LINK_OBJ) $(PREPROCESSOR_FLAGS) $(LIBRARIES)
nbody :