Parallel Programming - Improve camera UI
[matches/honours.git] / course / semester2 / pprog / assignment1 / Makefile
index b1a9b13..c66787e 100644 (file)
@@ -1,20 +1,18 @@
-#Makefile for nbody program
+# Makefile to build all programs
 
-CXX = gcc --std=c99 -Wall -pedantic  -g -lm -lGL -lglut -lGLU -lpthread -fopenmp
-LINK_OBJ = main.o nbody.o graphics.o
+all : single-thread/nbody mthread/nbody openmp/nbody
 
-BIN = nbody
+single-thread/nbody :
+       make -C single-thread
 
-$(BIN) : $(OBJ) 
-       $(CXX) -o $(BIN) $(OBJ)
+mthread/nbody :
+       make -C mthread
 
-%.o : %.c
-       $(CXX) -c $<
+openmp/nbody : 
+       make -C openmp
 
 clean :
-       $(RM) $(BIN) $(OBJ) $(LINKOBJ)
-
-clean_full: #cleans up all backup files
-       $(RM) $(BIN) $(OBJ) $(LINKOBJ)
-       $(RM) *.*~
-       $(RM) *~
+       make -C single-thread clean_full
+       make -C mthread clean_full
+       make -C openmp clean_full
+       rm *~

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