include $(SEPINC)/SEP.top
# First compile SDRlib my running 'make SDRlib/bin/version.txt'
# Start flows for CR figures by running 'make sep143_figs'
# Both ofthese are the default targets

# Miscellaneous templates
OMP_NUM_THREADS = 15

# Folder structure
RESDIR = ./Fig
SRCDIR = ./Src
PARDIR = ./Par
SDRDIR = ./SDRlib
DATDIR = /data/valhall_passive
R = ${RESDIR}
S = ${SRCDIR}
P = ${PARDIR}


# Compile SDRlib and add to path
${SDRDIR}/bin/version.txt:
	scons -C ${SDRDIR}/src
	echo "echo %date% %time% > $@"
PATH := ${PATH}:${SDRDIR}/bin
PATH := ${PATH}:${SDRDIR}


# Get data
include makefile_getdata

# Makefiles for SI
include makefile_bandpass
include makefile_si

# Makefile for maps
include makefile_maps

# Makefile for envelope functions
include makefile_env

# Eikonal tomography
include makefile_etom

# Figures
include makefile_matlab
include makefile_figures_sep143


# Default targets
sep143_figs: ${R}/Artman-V-Etom.v ${R}/Laura-V-Etom.v ${R}/Valhall-V-Etom.v ${R}/Laura-V-picked.v ${R}/snr-scat.v ${R}/snr-hist.pdf ${R}/estimates1a.eps ${R}/estimates2a.eps

default: ${SDRDIR}/bin/version.txt sep143_figs


# Create ps, pdf and gif files
%.ps: %.v
	pstexpen $< $@ fat=1 invras=y color=1

clean: jclean

burn: clean
	rm -f *.H*
	rm -f *.sepmatlab
	rm -f *.m
	rm -f ${R}/*.pdf
	rm -f ${R}/*.ps
	rm -f ${R}/*.v3
	rm -f ${R}/*.v
	scons -c

include ${SEPINC}/SEP.bottom
