MAKE_DEPEND=yes
include ${SEPINC}/SEP.top

BIN=./Bin
PAR=./Par
FIG=./Fig
DATA=./Data
SRC=./Src

#UF90LIBS=-lsep2df90 -lsepparf90 -lseppar -lsupersetf90 -lsuperset -L${UF90LIBDIRS}/libsepgeef90.a
#UF90FLAGS=-O1
LATOPTS  = style=html
#LATOPTS = option=web 'style=jfc,makeidx,html,amsmath'
SIGDIR = /mnt/sepdata/1a/sigsbee_multiple
OLEVEL=2
UF90FLAGS =-mp -check bounds
#UF90FLAGS =-parallel -openmp -openmp_report2  -axW -vec_report3
MAINLIBS=-lsep2df90 -lsep3df90 -lsep3d -lsepf90 -lsep -L${LIBDIR}  -lsepgeef90
UF90LIBS=${MAINLIBS} -lsepparf90 -lsepgeef90 -lsep2df90 -static-libcxa -lguide#-Bstatic -lseppar_mpi ${MPILIBS}
UF77LIBS = ${BEILIB}


avo: AVO.x
	mv AVO.x ../${BIN}/.

drop: Drop.x
	mv Drop.x ../${BIN}/.

velsin: velsin.x
	mv velsin.x ../${BIN}/.

velsin1: velsin1.x
	mv velsin1.x ../${BIN}/.

velsin2: velsin2.x
	mv velsin2.x ../${BIN}/.

ref: refcoef.x
	mv refcoef.x ../${BIN}/.

ref1: refcoef1.x
	mv refcoef1.x ../${BIN}/.

ref2: refcoef2.x
	mv refcoef2.x ../${BIN}/.

SinShot.H:
	Fdmod intag=velsin.H no_stdout=1 oxs=0 dxs=20 nxs=500 tmax=2. bx=300 ex=300 hsfile=temp.H
	Bandpass flo=5 fhi=42 < temp.H | Mute vmute=6000 tmute=0.7 tramp=0.05 >> $@

dirwave.H:
	Math file1=velsin.H exp="file1*0+3500" > v6000.H
	Fdmod intag=v6000.H no_stdout=1 oxs=0 dxs=20 nxs=1 tmax=3. bx=300 ex=300 hsfile=temp.H
	Bandpass flo=5 fhi=42 < temp.H > $@

velsin_mig.H:
	Pad beg2=200 end2=200 extend=1 <velsin.H > j1.H
	Transp reshape=1,3 plane=12 < j1.H > $@

Sinprep.H:
	Window < SinShot.H j1=2 max1=2 > j1.H
	< j1.H /net/koko/bob/SEP_BOB/bin/Transf shotmig=y is2d=y wei=y f_min=3 f_min1=6 f_max1=36 f_max=42 maxsize=1000 > j2.H
	< j2.H Transp reshape=1,3,5 plane=23 | Pad beg1=100 end1=100 > $@

source.H:
	Window n3=1 min3=0 n2=1 min2=0 max1=0.9733 < x.H | Pad end1=617 > j1.H; echo o1=-0.865 >>j1.H
	< j1.H /net/koko/bob/SEP_BOB/bin/Transf shotmig=y is2d=y wei=y f_min=3 f_min1=6 f_max1=36 f_max=42 maxsize=1000 > j2.H 
	< j2.H Transp reshape=1,3,5 plane=23 > $@

Mig01.H:
	@date
	Window3d squeeze=n n4=1 f4=0 <xxx.H >xxino.H
	./ShotMigNew D=xxino.H D_d=source.H V=velsin_mig.H R=$@  \
	nx_shots=1 ox_shots=-10000 \
	par=go_sis.P  taper=y  taper_pcent=2 marine=y minx=-15000 maxx=15000 & #restart=y

clean:
	rm -f *.o *.fix.* *.mod *.x .make.dependencies.LINUX86_64

include ${SEPINC}/SEP.bottom
