Quantcast
Channel: Intel® Software - Intel® Fortran Compiler for Linux* and macOS*
Viewing all articles
Browse latest Browse all 2746

Fortran library not rebuilding

$
0
0

Hi
I had a working set up consisting of a main program (F77) that calls a bunch of subroutines in a library. Suddenly, it appears that the library is not rebuilding - changes to the main program are implemented but those to a subroutine,“reader” in folder “util”, do not. The library builds without any errors and a new library archive is created via the following makefile (rewritten for easier reading):

FOR=ifort -c -O3
LINK=ifort
MY_DIR=/mydir
UTIL=$(MY_DIR)/util
(ditto many other subroutines)
.f.o:
    $(FOR) $<
.c.o:
    $(CC) $<
clean:
    rm -f *.o *~ core
libmy:
    rm libmy.a
    $(FOR) $(UTIL)/*.f  
   (ditto manyother subroutines)
    ar -rv $(MY_DIR)/libmy.a  *.o
    rm *.o

Then  the main program (and others) are compiled with another makefile. Again, there are no errors and a new executable is created.
FOR=ifort -c -O3 
LINK=ifort
MY_DIR=/mydir
LIBMY=-L$(MY_DIR) -lmy
.f.o:
    $(FOR) $(OPT) $<
.c.o:
    $(CC) $(OPT) $<
my_main.o: my_main.f
    $(FOR) my_main.f 
my_main: my_main.o
    $(LINK) -o my_main my_main.o  $(LIBMY)
    (ditto many other subroutines)

These makefiles used to work and have never changed, the only thing that has changed is the subroutine “reader”.

How can this be fixed?

 


Viewing all articles
Browse latest Browse all 2746

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>