1# Makefile that builts a library lib$(LIB).a from all 2# of the Fortran files found in the current directory. 3# Usage: make LIB=<libname> 4# Pearu 5 6OBJ=$(patsubst %.f,%.o,$(shell ls *.f)) 7all: lib$(LIB).a 8$(OBJ): 9 $(FC) -c $(FFLAGS) $(FSHARED) $(patsubst %.o,%.f,$(@F)) -o $@ 10lib$(LIB).a: $(OBJ) 11 $(AR) rus lib$(LIB).a $? 12clean: 13 rm *.o 14 15 16 17 18 19 20