<file_sep>OBJ_DIR=$(HOME)/workspace/abaqus/usrlib
FC=gfortran
FFLAGS=-c -O3 -fPIC -std=f2003 -ffree-form -fopt-info -fmax-errors=1 -fbounds-check -Werror
MAIN_SRC=capsul.f
COMMON_SRC=utils.f90	algebra.f90	deformation.f90 hardening.f90 init.f90
OBJECTS := $(patsubst %.f90, %-std.o, $(COMMON_SRC))
UMAT_SRC=./umat
capsul:$(OBJECTS)
	make -C $(COMMON_SRC)
	make -C $(UMAT_SRC)
	abaqus make library=${MAIN%.*} directory=$(DIR)
utils-std.o: utils.f90
	$(FC) $(FFLAGS) $< -o $@
algebra-std.o: algebra.f90 utils.f90
	$(FC) $(FFLAGS) $< -o $@
deformation-std.o: deformation.f90 utils.f90 algebra.f90
	$(FC) $(FFLAGS) $< -o $@
hardening-std.o:	hardening.f90 utils.f90 algebra.f90
	$(FC) $(FFLAGS) $< -o $@
init-std.f90:	init.f90 utils.f90 algebra.f90 crystal.f90 
	$(FC) $(FFLAGS) $< -o $@
clean:
	rm *.mod *.o
.PHONY: capsul clean



<file_sep>OBJ_DIR=$(HOME)/workspace/abaqus/usrlib
FC=gfortran
FFLAGS=-c -O3 -fPIC -std=f2003 -ffree-form -fopt-info -fmax-errors=1 -fbounds-check -Werror
SRC=utils.f90	algebra.f90	deformation.f90 hardening.f90 crystal.f90 init.f90 expansion.f90 umat_cp2.f90 
OBJECTS := $(patsubst %.f90, %-std.o, $(SRC)) capsul.o
capsul: $(OBJECTS)
	rm -fr $(OBJ_DIR)/*
	cp $^ $(OBJ_DIR)
	abaqus make library=$@ directory=$(OBJ_DIR)
utils-std.o: utils.f90
	$(FC) $(FFLAGS) $< -o $@
algebra-std.o: algebra.f90 utils.f90
	$(FC) $(FFLAGS) $< -o $@
deformation-std.o: deformation.f90 utils.f90 algebra.f90
	$(FC) $(FFLAGS) $< -o $@
hardening-std.o:	hardening.f90 utils.f90 algebra.f90
	$(FC) $(FFLAGS) $< -o $@
init-std.o:	init.f90 utils.f90 algebra.f90 crystal.f90 
	$(FC) $(FFLAGS) $< -o $@
crystal-std.o: crystal.f90 utils.f90 algebra.f90 hardening.f90
	$(FC) $(FFLAGS) $< -o $@
expansion-std.o: expansion.f90 utils.f90
	$(FC) $(FFLAGS) $< -o $@
umat_cp2-std.o: umat_cp2.f90 utils.f90 algebra.f90 init.f90 expansion.f90 crystal.f90 deformation.f90 hardening.f90
	$(FC) $(FFLAGS) $< -o $@
capsul.o: capsul.f utils.f90 
	$(FC) $(FFLAGS) $< -o $@
clean:
	rm *.mod *.o
.PHONY: capsul clean



<file_sep>#! /bin/bash
rm -fr *-std.o *.mod
DIR="${HOME}/workspace/abaqus/usrlib"
SRC="utils.f90 algebra.f90  deformation.f90 hardening.f90 crystal.f90 	
		 init.f90 umat_cp1.f90"
MAIN="capsul.f"
FC="gfortran"
CPFLAGS="-c  -O3 -fPIC -std=f2003 -ffree-form -fopt-info
         -fmax-errors=1 -fbounds-check"
#         -Wall -Werror -fmax-errors=1 -fbounds-check"
for SRCFILE in $SRC
do
  ${FC} ${CPFLAGS} ${SRCFILE} -o ${SRCFILE%.*}-std.o
done
rm -fr ${DIR}/*.o ${DIR}/*.so
mv *std.o ${DIR}
abaqus make library=${MAIN%.*} directory=${DIR}
<file_sep>
    ! Declaration of interface variables
    real(kind = RKIND)    :: SSE
    real(kind = RKIND)    :: SPD
    real(kind = RKIND)    :: SCD
    real(kind = RKIND)    :: RPL
    real(kind = RKIND)    :: DRPLDT
    real(kind = RKIND)    :: DTIME
    real(kind = RKIND)    :: TEMP
    real(kind = RKIND)    :: DTEMP
    integer(kind = IKIND) :: NDI
    integer(kind = IKIND) :: NSHR
    integer(kind = IKIND) :: NTENS
    integer(kind = IKIND) :: NSTATV
    integer(kind = IKIND) :: NPROPS
    real(kind = RKIND)    :: PNEWDT
    integer(kind = IKIND) :: NOEL
    integer(kind = IKIND) :: NPT
    integer(kind = IKIND) :: LAYER
    integer(kind = IKIND) :: KSPT
    integer(kind = IKIND) :: KSTEP
    integer(kind = IKIND) :: KINC
    character(len = *)    :: CMNAME
    character(len = *)    :: CELENT

    real(kind = RKIND)    :: STRESS(NTENS)
    real(kind = RKIND)    :: STATEV(NSTATV)
    real(kind = RKIND)    :: DDSDDE(NTENS, NTENS)
    real(kind = RKIND)    :: DDSDDT(NTENS)
    real(kind = RKIND)    :: DRPLDE(NTENS)
    real(kind = RKIND)    :: STRAN(NTENS)
    real(kind = RKIND)    :: DSTRAN(NTENS)
    real(kind = RKIND)    :: TIME(2)
    real(kind = RKIND)    :: PREDEF(1)
    real(kind = RKIND)    :: DPRED(1)
    real(kind = RKIND)    :: PROPS(NPROPS)
    real(kind = RKIND)    :: COORDS(3)
    real(kind = RKIND)    :: DROT(3, 3)
    real(kind = RKIND)    :: DFGRD0(3, 3)
    real(kind = RKIND)    :: DFGRD1(3, 3)

