Parallel Programming - Final version
[matches/honours.git] / course / semester2 / pprog / assignment1 / nbody-bh / Makefile
diff --git a/course/semester2/pprog/assignment1/nbody-bh/Makefile b/course/semester2/pprog/assignment1/nbody-bh/Makefile
new file mode 100644 (file)
index 0000000..1bca5a9
--- /dev/null
@@ -0,0 +1,27 @@
+# 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 -lpthread
+FLAGS = --std=c99 -Wall -pedantic -g
+PREPROCESSOR_FLAGS = -fopenmp
+SINGLE_THREAD_OBJ = main.o nbody.o graphics.o 
+LINK_OBJ = main.o nbody.o graphics.o tree.o
+
+BIN = nbody
+
+$(BIN) : $(LINK_OBJ) 
+       $(CXX) -o $(BIN) $(LINK_OBJ) $(PREPROCESSOR_FLAGS) $(LIBRARIES)
+
+nbody : 
+
+%.o : %.c
+       $(CXX) $(FLAGS) $(PREPROCESSOR_FLAGS) -c $<
+
+clean :
+       $(RM) $(BIN) $(OBJ) $(LINK_OBJ)
+
+clean_full: #cleans up all backup files
+       $(RM) $(BIN) $(OBJ) $(LINK_OBJ)
+       $(RM) *.*~
+       $(RM) *~

UCC git Repository :: git.ucc.asn.au