Good morning,
I have question concerning creating makefile.
have a f77 code compiling with f90 and I would like to add f90 subroutine.
so I have some files.f and some files.f90
how to specifie in the make the rules to create .o90 (or .o) from .f90.?
___________________________________________________________________________________
ALL : ut
OBJECTS= aibi.o amult.o atmult.o autodt.o bandsr.o bcg.o bcgs.o \
blk.o blkdta000.o blkup.o calc.o capab.o capgrv.o capres.o \
chlsky.o chodec.o ckconv.o ctomfr.o ctpmfr.o ctsat.o defindex.o\
dens.o dercvt.o derlnf.o derzp.o dfault.o dirneg.o disper.o \
dtnkdt.o echall.o eoscnst.o ershow.o fac7.o fcoef.o fla1vec.o \
anew.o cubic.o phasn.o fstab.o swap.o \
dtnkdt2.o disper2.o90
FFLAGS = -O
LDFLAGS =
LIBS =
#how to add rule to do *.f90--> *.o90 ?
.f.o:
f90 $(FFLAGS) -c $<
ut: $(OBJECTS)
f90 $(LDFLAGS) $(OBJECTS) $(LIBS) -o ut
@echo "remake of program ut is complete"
_______________________________________________________________________________________
in this case disper2.o90 comme from disper2.f90 and all the other are .f
the compiler can create the objects from .f but not from .f90 ("don't have the rule for target
disper2.o or .o90")
I have tried to add
.f90.o90:
f90 $(FFLAGS) -c $<
but it doesn't work...
Thank you if you can help me....
Jean-Yves
University of Houston
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|