Photran: building with an existing makefile

2019-08-07 21:15发布

Kind all,

I've received a very messy fortran program which I'm tried to debug: in order to do that I would like to use the debugging features of a IDE to ease the process, an IDE such as Eclipse Photran

The program is made by multiple .f90 files (and other auxiliary files that it reads at runtime) with an associated makefile.

I've created an empty makefile fortran project, copied the original folders and files in the new Photran workspace and now I'm trying to build the executable via the existing makefile to proceed with debug, but I'm failing at it.

I do not understand how to create a make target so that Photran does the same thing as typing into the console "make makefile", can somebody help on this?

Thanks

1条回答
地球回转人心会变
2楼-- · 2019-08-07 21:33

Found how!

I find the "make targets" function of Eclipse quite confusing, but still, here's what I've done:

  1. create a new make target in the folder where the makefile resides, give it any name under "Target Name" (it's just for Eclipse's purposes)

  2. untick the box "same as the target name" and remove all characters from the textbox. It has to be empty

  3. insert whatever make command/flag you want into the "use builder settings" or leave it as is

  4. double click on the newly created target, Eclipse should automatically invoke make and find your makefile. This should build your program.

Maybe it's basic, but for a newbie like me it was not clear, therefore I'll leave the answer here for any other "noob" stumbling on this problem.

查看更多
登录 后发表回答