Here I have two Fortran90 files and a makefile:
Contents of file main_mod.f90:
module main_mod contains subroutine add(
... Specify them in your rules.
main_mod2.o: main_mod.o