makefile from unix to windows

makefile from unix to windows

Hallo, I'm new here and in the world of fortran.

I have some problem and I hope someone here could help me.

I used to work on linux with intel fortran compiler and I have all the file .f90, a file .bat to create an executible file, the makefile and a file with the configuration for the make (with the library link to lapack and openMP). Now I can no longer work on those machines with linux.

Right now I must find a solultion to work with the university's computers, here I have "Compaq Visual Fortran Professional Edition 6.6.0".

I need to modify the way to create the executible or create a new one, but I have no idea on how to do that.

Someone have a tutorial, guideline easy to understand?

Some advice?

Anything that could be usefull

Thanks for any halp

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

You have several options:

  1. create a project in CVF (I think you can do that but it's so old now I can't really remember) to build it with
  2. install MingW or Cygwin and use your existing Makefile - you'll probably have to tweak the command line options
  3. if you've got Visual Studio create an nmake file (which will be similar to your existing Makefile)
  4. assuming you can still access your Linux system use your existing build to create a .bat file which you can then run on Windows

Once you've done that you might find your code doesn't build because CVF is so old!

You can probably use your makefiles with Nmake and the Compaq compiler. Just open the CVF command prompt, change to the directory where your files are located, and type "nmake -n". If include files or library files are not located by the compiler (it will issue messages accordingly) you may have to modify the environment variables INCLUDE and LIB.

There are several good ports of gnu make for Windows.  In order to use your linux Makefile, you would add e.g.

.SUFFIXES: .obj [.exe .lib]

and make appropriate changes to definitions of FC, FFLAGS...

If you wish to use .o files you can add mv $*.obj $*.o as a step in make rules; Microsoft link will warn but accept it.

Leave a Comment

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