Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29277 Discussions

I want my .obj files and .for files in a separate folder.

Brian_A_
Novice
709 Views

Right now when I compile all my .for and .obj files are in the same folder.  I want it so when it compiles they go the folder "o".

I have attached my makefiles.  the command I type to compile is "nmake -f makeri -x- >look"  Makeri calls makerip.

0 Kudos
3 Replies
jimdempseyatthecove
Honored Contributor III
709 Views

Add to your fortran options:

 /object:YourObjectDirectory\

Jim Dempsey

0 Kudos
Brian_A_
Novice
709 Views

what about the ".for" files?  I have it working now for the object files.

0 Kudos
jimdempseyatthecove
Honored Contributor III
709 Views

The .for files are generally in the current directory. i.e. you set the current directory to that of the .for files. In your make file you see in several places "cd auxx" (and at end of section "cd ..". auxx would be where the sources would be located for that instance. You would add a section for your new .for files that would "cd YourForFiles".

Or you can explicitly add the path to your .for file if you wish,

: Near Top
ForPath = YourForFiles
...
$(f90) -nologo $(ForPath)\select.f

or use:

$(f90) -nologo YourForFiles\select.f

Generally the preferred method is to set the current directory to that of your sources.

Jim Dempsey

0 Kudos
Reply