0

I have a simple ./compile.make script that produces a bunch of object .o files. The contents are like this (first 5 lines printed):

compile.make:

gfortran -c -O3 active.f
gfortran -c -O3 alchemy.f
gfortran -c -O3 analysis.f

I run the script by doing ./compile.make. I'd like to compile everything with the -g flag so I can debug using (gdb) but I was wondering if there is a better way to add the "-g" flag without having to manually edit every line of my compile.make file.

*EDIT: I know that find/replace option is available and not much of a hassle at all. I was just curious as to whether the flags can be added upon execution of the script.

F'x
  • 12,105
  • 7
  • 71
  • 123
ejang
  • 3,982
  • 8
  • 44
  • 70
  • Have you considered moving over to a tool like `make`? I think it would save you many headaches, long-term. – Jack Kelly Nov 25 '11 at 20:46

1 Answers1