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

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

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.

AttachmentSize
Downloadtext/plain makeri.txt2.47 KB
Downloadtext/plain makerip.txt22.13 KB
4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Add to your fortran options:

 /object:YourObjectDirectory\

Jim Dempsey

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

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

Leave a Comment

Please sign in to add a comment. Not a member? Join today