I want to add a new mod.F90 to the ROMS. Which file do I need to add the path of this mod.F90 to?
If I change the suffix .F90 to .F, the program can be compiled successfully
Add the path of a new Fortran90 file
Re: Add the path of a new Fortran90 file
The makefile has rules for going from .F files to .f90 files to compile them into .o files. You would have to add rules for .F90 files if you refuse to rename your file.
Re: Add the path of a new Fortran90 file
Thanks for your help!
What rules do I need to add to makefile? Is it added in lines 181-195?
What rules do I need to add to makefile? Is it added in lines 181-195?
Re: Add the path of a new Fortran90 file
Thanks for your help!
What rules do I need to add to makefile? Is it added in lines 181-195?
What rules do I need to add to makefile? Is it added in lines 181-195?
- Attachments
-
- TIM截图20200701131527.jpg (17.22 KiB) Viewed 2268 times
Re: Add the path of a new Fortran90 file
I don't think so. It instead uses:
and friends. The compile-rules function is called in the Module.mk files.
Code: Select all
define compile-rules
$(foreach f, $(local_src), \
$(call one-compile-rule,$(call source-to-object,$f), \
$(call f90-source,$f),$f))
endef
Re: Add the path of a new Fortran90 file
If I were to overhaul this now, I would check to see if the compilers now in use can all invoke the C-preprocessor automatically for .F90 files. If so, take out the cpp step and the cpp_clean step and just have compile-time errors point to the line number of the .F90 file. I did once meet a compiler that would not invoke cpp correctly and that's why things are the way they are in the build system - but that was a long time ago.