include ${SEPINC}/SEP.top

RESDIR = ../Fig
RESULTSER = tvdeconC

UTUBEFLAGS = -geometry 900x1200

innfile = in.H
${innfile} : ../Data/in.HH
	cp ../Data/in.HH ${innfile}

labs = "labels=TVdecon, eps=${eps} input: iter=1:     =2:     =3:     =4:  =${niter} or err < ${tol}"
dots = Dots >/dev/null yreverse=1 strings=1 connect=3 ${labs}

default: view

outfile = tvdeconout.H

# WARNING: MY filtGap=5 corresponds to a FORTRAN gap=6
filtSize = 8
filtGap  = 5
rho      = 0.9
eps      = 0.7

niter    = 100
tol      = 1e-9

${RESDIR}/tvdeconC.v : ${innfile} link
	${JAVAX} ${PACKAGE}.TVDecon  in=${innfile} out=${outfile} \
	                            eps=${eps}     rho=${rho}     \
	                       filtSize=${filtSize}               \
	                       filtGap =${filtGap}                \
	                          niter=${niter}   tol=${tol}
	<${outfile} ${dots} title=" " out=$@

clean: jclean

# NATIVE LINKING RULE
# The only thing I'm missing now is knowing how to generally set the lib path
# (LD_LIBRARY_PATH) to this directory.
link:
	gcc -shared nstat_tvdeconC_NonstationaryInternalConvolution.c  \
	                         NonstationaryInternalConvolutionC.c \
	                         -I/usr/lib/java/include           \
	                         -I/usr/lib/java/include/solaris   \
	                         -o niclib.so
	@echo
	@echo "Don't forget setenv LD_LIBRARY_PATH <dirname of *.so>"

stubs: 
	${MAKE} ${PACKAGE}.NonstationaryInternalConvolution.javah

include ${SEPINC}/SEP.bottom

