SHELL = /bin/sh
SRC = $(wildcard *.f)
SRC1 = $(wildcard *.F)
FILES = $(SRC) $(SRC1) Makefile.* README
LIB = liblinalg.a
OBJ = $(SRC:.f=.o) $(SRC1:.F=.o)
FC = gfortran
FFLAGS = -O3 -fPIC -ffast-math -fstrict-aliasing -fno-second-underscore
FFLAGS0 = -O0 -fPIC -fno-second-underscore
ARCHIVE = ar
AR = ar
ARCHFLAG = -rcs
USRLIB =
SYSLIB =
lib: $(OBJ)
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
%.o:%.F
$(FC) $(FFLAGS) -c $<
%.o:%.f
$(FC) $(FFLAGS) -c $<
dlamch.o: dlamch.f
$(FC) $(FFLAGS0) -c $<
clean:
-rm -f *.o *.mod *~ $(LIB)
tar:
-tar -czvf ../linalg.tar.gz $(FILES)