lammps/lib/linalg/Makefile.gfortran

53 lines
892 B
Makefile

# -*- makefile -*-
# *_________________________________________________________________________*
# * Minimal BLAS/LAPACK Library for use by other LAMMPS packages
SHELL = /bin/sh
# ------ FILES ------
SRC = $(wildcard *.f)
FILES = $(SRC) Makefile.* README
# ------ DEFINITIONS ------
LIB = liblinalg.a
OBJ = $(SRC:.f=.o)
# ------ SETTINGS ------
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 =
# ------ MAKE PROCEDURE ------
lib: $(OBJ)
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
# ------ COMPILE RULES ------
%.o:%.F
$(F90) $(F90FLAGS) -c $<
%.o:%.f
$(FC) $(FFLAGS) -c $<
dlamch.o: dlamch.f
$(FC) $(FFLAGS0) -c $<
# ------ CLEAN ------
clean:
-rm -f *.o *.mod *~ $(LIB)
tar:
-tar -czvf ../linalg.tar.gz $(FILES)