# Simple Makefile # - Basement Supercomputing (c) Copyright 2007 # # IMPORTANT # If you are using modules, you must set the appropriate # module so the lapack and blas libraries can be found. # # module load lapack-gnu4 # # will load the lapack module for gnu4 compilers # # This step will automatically set $LAPACK_PATH for # the correct libraries for your compiler. # See modules section in the documentation for # more information # # Set Fortran compiler e.g. # G77 or Gfortran for GNU # pgf90 for Portland Group FC=gfortran # Set Fortran Flags FFLAGS= -O2 # Set Path to you library files $LAPACK_PATH is defined by # modules, or you can enter a specific path LIBPATH= -L$(LAPACK_PATH) # Set the libraries you need LIBS= -llapack -lblas # Set the source files DEPS = test_la.f # Set the object files OBJ = test_la.o # Make rules follow %.o: %.f $(DEPS) $(FC) $(FFLAGS) -c -o $@ $< test_la_fortran: $(OBJ) $(FC) $(FFLAGS) -o $@ $^ $(LIBPATH) $(LIBS) clean: /bin/rm -f test_la_fortran test_la.o # Command line version # # gfortran -o test_la_fortran test_la.f -llapack -lblas -L$LAPACK_PATH