The make system compiles codes as follows.  (See GMakerules.mak for
more details.)

A foo.f file is compiled as 
    $(COMPILE.f) -o foo.o foo.f

A foo.f90 file is compiled as
    $(COMPILE.f90) -o foo.o foo.f90

A foo.F90 file is compiled as
    $(COMPILE.f90) $(FPP_DEFINES) -o foo.o foo.F90

A foo.c file is compiled as
    $(COMPILE.c) -o foo.o foo.c

A foo.cpp file is compiled as
    $(COMPILE.cc) -o foo.o foo.cpp

The .F files and .F90 files are And the final link is
    $(LINK.f90) -o myexectuable all_the_objects $(libraries)

Here, variables COMPILE.*, LINK.f90, FPP_DEFINES and libraries are
defined in various files in this directory.  If you find it is hard to
tweak the system, the simplest approach might be have your own
Make.local file in this directory, which will be include in
GMakerules.mak.  

In your Make.local, you can set these variables to desired values.
Note that you can use something like

    make <COMP=gfortran ...> echo-libraries

to examine the value of $(libraries) or others.  Then you may append
the variable like below in Make.local to add an extra library,

   libraries += -lfftw3f

