I am trying to write a makefile for compiling a program with source files with both .f and .f90 extensions. I have the rule to compile the objects:
%.o: %.f90
$(FC) $(FFLAGS) -c $< -o $(OBJ)/$@
How can I extend this to work with the .f files as well?
You will need to have two separate rules: one for the
.ffiles and one for the.f90files. For example:or something similar should do the trick.