X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=course%2Fsemester2%2Fpprog%2Fassignment1%2FMakefile;h=c66787edd9f32b164893968ec7bda88eb4d16dfa;hb=f2970e1b67ccd1adff8cd04a176efdc9682adf06;hp=cd6f0fee4aa4de29017185e486e58ff2b3fb83b4;hpb=297f83fd160c68e52981004624723c22d60a2c0e;p=matches%2Fhonours.git diff --git a/course/semester2/pprog/assignment1/Makefile b/course/semester2/pprog/assignment1/Makefile index cd6f0fee..c66787ed 100644 --- a/course/semester2/pprog/assignment1/Makefile +++ b/course/semester2/pprog/assignment1/Makefile @@ -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 *~