在Windows 7的“英特尔Fortran ifort”中,将不同文件中的多个模块编译为一个obj文件

在Windows 7的“英特尔Fortran ifort”中,将不同文件中的多个模块编译为一个obj文件,fortran,fortran90,intel-fortran,Fortran,Fortran90,Intel Fortran,我曾经在一个名为umat.f90的文件中 !!! umat.f90 module1 !! Content of module1 end module1 module2 !! Content of module2 end module2 !! This has to be a subroutine to interface with some legacy code in a software called ABAQUS subroutine umat (argument-list) us

我曾经在一个名为
umat.f90
的文件中

!!! umat.f90
module1
!! Content of module1
end module1


module2
!! Content of module2
end module2


!! This has to be a subroutine to interface with some legacy code in a software called ABAQUS
subroutine umat (argument-list)
use module1
use module2
!! Content of umat
end subroutine umat
这很有效。我可以使用
ifort-c umat.f90
,然后它生成一个
umat.obj
链接到名为
ABAQUS
的软件(我无法修改)。现在,由于可以重复使用
module1
module2
,我想将它们保存在单独的
.f90
文件中,以符合干燥原则。因此,这将成为三个独立的文件:

文件#1:

文件#2:

文件#3:

但是,现在如果我运行ifort/c module1.f90 module2.f90 umat.f90,它将生成3个obj文件。
umat.obj
似乎不再包含来自
module1
module2
的模块信息

鉴于我只能提供一个
.obj
文件来与ABAQUS接口,我可以将它们编译成一个大的
.obj
文件吗


PS:我知道我可以使用python脚本每次自动将三个文件复制并粘贴到一个文件中,但这似乎是一种非常肮脏和不雅观的方法。

我还没有测试过这一点,但我阅读了ifort文档,
/Qipo[n]
选项可能会起作用。发件人:

/七坡[n] 此选项启用文件之间的过程间优化。n是一个可选整数,指定编译器应创建的对象文件数。整数必须大于或等于0。如果n大于0,编译器将生成n个对象文件,除非n超过源文件数(m),在这种情况下,编译器仅生成m个对象文件

例如:
ifort/Qipo[1]/c module1.f90 module2.f90 umat.f90

希望它能起作用

Qipo-c(单个命令)是什么,即ifort/Qipo-c module1.f90 module2.f90 umat.f90?
!!! module1.f90
module1
!! Content of module1
end module1
!!! module2.f90
module2
!! Content of module2
end module2
!!! umat.f90
!! This has to be a subroutine to interface with some legacy code in a software called ABAQUS
subroutine umat (argument-list)
use module1
use module2
!! Content of umat
end subroutine umat