::#############################################################
::
:: Compilation of MonolithFEsqr
::
::############################################################
::
if not defined MATERIAL SET MATERIAL=Mises
SET OUTPUTNAME=MonolithFE2_%MATERIAL%.obj
if not defined ABACALL SET ABACALL=abaqus
CALL :abspath UELlibDIR "..\uellib\lib\"
CALL :abspath UELDIR "..\uel-large-deformation\src\"
CALL :abspath MATERIALDIR "..\uel-large-deformation\materialroutines\%MATERIAL%"
::SETLOCAL
SET INCLUDE=%INCLUDE%;%UELlibDIR%;%UELDIR%;%MATERIALDIR%
chdir src
CALL %ABACALL% make library=UMATmacro_mechanical.f
::del standardU.dll
move /Y UMATmacro_mechanical-std.obj ..\bin\%OUTPUTNAME%
move /Y standardU.dll ..\bin\standardU_%MATERIAL%_%ABACALL%.dll
chdir ..\

::Function to get absolute path
:abspath
set %~1=%~f2
EXIT /B 0