- Welcome to Simply Fortran
- Purchasing and Activating Simply Fortran
- Using Simply Fortran
- The Simply Fortran Interface
- Editing in Simply Fortran
- Projects in Simply Fortran
- Building Projects
- Launching Projects
- Debugging Programs
- External Tools
- Version Control
- Options and Configuration
- Licensing
Generating the Makefile
If a project has been saved, the user can explicitly generate a makefile for a project via the Generate Makefile command in the Build menu . Alternatively, the makefile generation procedure will be performed whenever the user executes any of the other build procedures , as these other procedures rely on the existence of a makefile.
Internal Procedure
When the makefile is being generated, Simply Fortran scans all project files to determine the interdependencies of any Fortran 90 (or higher) files. Because Fortran files containing modules relied on by other files must be compiled first, Simply Fortran generates a makefile that explicitly requires necessary modules and their source files to be compiled first.
Additionally, Simply Fortran also scans Fortran files for INCLUDE statements. The include statement pulls the contents of another file into the file containing the INCLUDE statement. If an included file is part of the current project, it is added as a dependency to the file containing the INCLUDE statement. If the included file is not explicitly contained in the project, the file is not marked as a dependency for the originating source file. This procedure allows changes in included project files to properly trigger rebuilding source files which INCLUDE the changed file, but it avoids unnecessarily complicating the build process with static extra-project file dependencies.
Using the Makefile Outside of Simply Fortran
The generated makefile can be used outside of the Simply Fortran environment to build projects as well. The user should note, however, that Simply Fortran use Open Watcom Make for building projects, and the generated makefile uses some Open Watcom Make-specific tokens and workflow. To construct a project with a makefile externally, the make command is:
wmake all
If the user wishes to employ GNU Make, a more commonly found utility, an export option should be used instead.
Automatic Makefile Generation
By default, makefiles are only generated when they do not yet exist or the user explicitly commands their generation. However, Simply Fortran can automatically regenerate the makefile every time a build is initiated in order to capture any changes in the project structure or individual file dependencies. Automatic regeneration of makefiles can be enabled in the Project Options dialog.
See Also
Building in Simply Fortran
Make and Makefile Options
Build
“Project Export Options:../projects/export.html