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