Parallel Programming - Final version
[matches/honours.git] / course / semester2 / pprog / assignment1 / Makefile
index cd6f0fe..c66787e 100644 (file)
@@ -1,45 +1,18 @@
-INCLUDE_PATH = -I/usr/include
-LIBRARY_PATH = -L/usr/lib64 
-CCFLAGS = -std=c99 #-framework GLUT -framework OpenGL -framework Cocoa
-LDFLAGS = -lglut -lGL -lGLU -lpthread -lm
+# Makefile to build all programs
 
-# the directories containing the OpenGL libraries, f90gl libraries, GLUT
-# libraries, and f90gl GLUT libraries
-OGLLIBDIR = -L/usr/X11/lib
+all : single-thread/nbody mthread/nbody openmp/nbody
 
-# the fortran 90 libraries for OpenGL, including GLUT, GLU and OpenGL
-F90GLUTLIB = -lf90glut -lf90GLU -lf90GL
+single-thread/nbody :
+       make -C single-thread
 
-# the X11 libraries
-X11LIB = -framework GLUT -framework OpenGL -framework Cocoa
+mthread/nbody :
+       make -C mthread
 
-# the f90 compiler flag for specifying the location of MOD files
-MODS = -I/usr/X11/include/GL
-
-# the directory containing the X11 libraries
-X11LIBDIR =
-
-# fortran 90 compiler and compiler flags
-F95 = g95
-F90 = /usr/local/gfortran/bin/gfortran
-F90FLAGS = -O 
-F90FLAGS2 = -fopenmp -O
-GCC = gcc
-
-APP = nbody 
-
-all: $(APP)
-       @echo Make done
-
-#%: %.c
-#      gcc $^ -o $@ $(INCLUDE_PATH) $(CCFLAGS) $(LIBRARY_PATH) $(LDFLAGS)
-
-clean:
-       @rm -f *.o $(APP)
-
-nbodyf: nbodyf.f90
-       $(F90) nbodyf.f90 -o nbodyf $(F90FLAGS) $(MODS) $(OGLLIBDIR) $(F90GLUTLIB) $(X11LIBDIR) $(X11LIB)
-
-nbody: nbody.c
-       $(GCC) -o nbody nbody.c $(INCLUDE_PATH) $(CCFLAGS) $(LIBRARY_PATH) $(LDFLAGS)
+openmp/nbody : 
+       make -C openmp
 
+clean :
+       make -C single-thread clean_full
+       make -C mthread clean_full
+       make -C openmp clean_full
+       rm *~

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