title: How to compile Fortran FUNCTION/SUBROUTINE in separate files into a single MODULE
body: <p>Usually, when I write a collection of Fortran functions, I put them into a <code>MODULE</code> like this:</p>
  
  <pre><code>!mystuff.f90
  MODULE mymodule
  IMPLICIT NONE
  
  CONTAINS
  
    SUBROUTINE mysubroutine1(a,b)
    !code
    END SUBROUTINE
  
    SUBROUTINE mysubroutine2(a,b)
    !code
    END SUBROUTINE
  
    !lots more functions and subroutines
  
  END MODULE
  </code></pre>
  
  <p>and I successfully compile it like this  <code>gfortran -c mystuff.f90</code>. This creates <code>mystuff.o</code> which I can use in my main program.</p>
  
  <p>However, the number and individual sizes of functions/subroutines in my <code>MODULE</code> have become so huge, that I really need to split up this up into different files.</p>
  
  <pre><code>!mysubrtn1.f90
  SUBROUTINE mysubroutine1(a,b)
  !code
  END SUBROUTINE
  </code></pre>
  
  <p>and </p>
  
  <pre><code>! mysubrtn2.f90
  SUBROUTINE mysubroutine2(a,b)
  !code
  END SUBROUTINE
  </code></pre>
  
  <p>and so forth...</p>
  
  <p>But I'd still like to keep all these functions inside a <em>single</em> <code>MODULE</code>.  How can I tell the compiler to compile the functions in <code>mysubrtn1.f90</code>, <code>mysubrtn2.f90</code>, ... such that it produces a single module in a <code>.o</code> file?</p>