# This makefile is utilized for making the gdoc res file. The res file provides # the information necessary for the integration routine. This makefile also # links the compiled res file to the necessary libraries to build an # executable. # compiler information f77 = g77 fflags = -g -O2 -fPIC # gdoc bin path binPath = ../bin # gdoc command gdoc = $(binPath)/gdoc-compiler # gdoc compiler flags gdocflags = -bd #b for bounds cutting and d for discontinuity locking # name of the generated executable target = libres.so # object files objs = $(input).o instructions : ./GDOC --help @(echo 'type make and one of the problem names:') @(echo '298, 298var, chi298, chi323, Arrhenius, ') @(echo 'AtoBtoC, CKL, Cracking, Denbi, Division, ') @(echo 'Exponential, Integrand, Inverse, Luus, OSP,') @(echo 'Reversible, SC, SCvar, ') # examples chi298 : -@rm $(target) make $(target) -e "input = input/chi298" @(echo '') @(echo 'Execute: GDOC -l -NL SLSQP data/chi298.inp') @(echo 'Be sure to set the integration tolerance to 1E-10') @(echo 'and the domain reduce option to false in options.bnb') chi323 : -@rm $(target) make $(target) -e "input = input/chi323" @(echo '') @(echo 'Execute: GDOC -l -NL SLSQP data/chi323.inp') @(echo 'Be sure to set integration tolerance to 1E-10') @(echo 'and the domain reduce option to false in options.bnb') 298 : -@rm $(target) make $(target) -e "input = input/298" @(echo '') @(echo 'Execute: GDOC -l -NL IPOPT data/298.inp') @(echo 'Be sure to set integration tolerance to 1E-10 in options.bnb') 298var : -@rm $(target) make $(target) -e "input = input/298var" @(echo '') @(echo 'Execute: GDOC -l -NL IPOPT data/298.inp') @(echo 'Be sure to set integration tolerance to 1E-10 in options.bnb') Arrhenius : -@rm $(target) make $(target) -e "input = input/Arrhenius" @(echo '') @(echo 'Execute: GDOC -L LPSOLVE -fn1 (or GDOC -L LPSOLVE -fn2)') AtoBtoC : -@rm $(target) make $(target) -e "input = input/AtoBtoC" @(echo '') @(echo 'Execute: GDOC -L LPSOLVE data/AtoBtoC.inp') CKL : -@rm $(target) make $(target) -e "input = input/CKL" @(echo '') @(echo 'Execute: GDOC -fe -L LPSOLVE') Cracking : -@rm $(target) make $(target) -e "input = input/Cracking" @(echo '') @(echo 'Execute: GDOC -L LPSOLVE data/Cracking.inp') Denbi : -@rm $(target) make $(target) -e "input = input/Denbi" @(echo '') @(echo 'Execute: GDOC -fn2 -U IPOPT -L LPSOLVE') Division : -@rm $(target) make $(target) -e "input = input/Division" @(echo '') @(echo 'Execute: GDOC -L LPSOLVE data/Division.inp') Exponential : -@rm $(target) make $(target) -e "input = input/Exponential" @(echo '') @(echo 'Execute: GDOC -fe -L LPSOLVE') Integrand : -@rm $(target) make $(target) -e "input = input/Integrand" @(echo '') @(echo 'Execute: GDOC -de -NL SLSQP') Inverse : -@rm $(target) make $(target) -e "input = input/Inverse" @(echo '') @(echo 'Execute: GDOC -fe -L LPSOLVE') OSP : -@rm $(target) make $(target) -e "input = input/OSP" @(echo '') @(echo 'Execute: GDOC -fn2 -NL IPOPT -fn1 ') Reversible : -@rm $(target) make $(target) -e "input = input/Reversible" @(echo '') @(echo 'Execute: GDOC -NL IPOPT data/Reversible.inp') SC : -@rm $(target) make $(target) -e "input = input/SC" @(echo '') @(echo 'Execute: GDOC -dn2 -NL IPOPT') SCvar : -@rm $(target) make $(target) -e "input = input/SCvar" @(echo '') @(echo 'Execute: GDOC -fn2 -L LPSOLVE') Luus : -@rm $(target) make $(target) -e "input = input/Luus" @(echo '') @(echo 'Execute: GDOC -fn3 -L LPSOLVE') # leave below this line alone! # building the shared library $(target) : $(objs) $(f77) -shared $(fflags) -o$(target) $(objs) # build an object file from the residual $(input).o : $(input).f $(f77) $(fflags) -c -o$(input).o $(input).f # generate the residual file $(input).f : $(input).oai $(gdoc) $(gdocflags) -o$(input).f $(input).oai clean : -rm $(target) -(cd input; rm *.o *.f)