.PHONY: all dist distclean

all: dist

dist: \
	field_single \
	field_three \
	field_square \
	#


distclean:
	rm -v field_single_left_time.*
	rm -v field_single_left_phase.*
	rm -v field_single_center_time.*
	rm -v field_single_center_phase.*
	rm -v field_three_left_time.*
	rm -v field_three_left_phase.*
	rm -v field_three_center_time.*
	rm -v field_three_center_phase.*
	rm -v field_square_all_time.*
	rm -v field_square_all_phase.*
	rm -v field_square_ref0_time.*
	rm -v field_square_ref0_phase.*

field_single: \
	field_single_left_time.pdf    field_single_left_time.png \
	field_single_left_phase.pdf   field_single_left_phase.png \
	field_single_left_time_nomax.pdf    field_single_left_time_nomax.png \
	field_single_center_time.pdf  field_single_center_time.png \
	field_single_center_phase.pdf field_single_center_phase.png \
	field_single_center_time_nomax.pdf  field_single_center_time_nomax.png \
	#

field_single_left_time.%: src/beacon_field.py
	$< --time $@ single-left
field_single_left_phase.%: src/beacon_field.py
	$< --phase $@ single-left
field_single_left_time_nomax.%: src/beacon_field.py
	$< --time $@ single-left --max-rms 0

field_single_center_time.%: src/beacon_field.py
	$< --time $@ single-center
field_single_center_phase.%: src/beacon_field.py
	$< --phase $@ single-center
field_single_center_time_nomax.%: src/beacon_field.py
	$< --time $@ single-center --max-rms 0

field_three: \
	field_three_left_time.pdf    field_three_left_time.png \
	field_three_left_phase.pdf   field_three_left_phase.png \
	field_three_center_time.pdf  field_three_center_time.png \
	field_three_center_phase.pdf field_three_center_phase.png \
	field_three_left_time_nomax.pdf    field_three_left_time_nomax.png \
	field_three_center_time_nomax.pdf  field_three_center_time_nomax.png \
	#

field_three_left_time.%: src/beacon_field.py
	$< --time $@ three-left
field_three_left_phase.%: src/beacon_field.py
	$< --phase $@ three-left
field_three_left_time_nomax.%: src/beacon_field.py
	$< --time $@ three-left --max-rms 0

field_three_center_time.%: src/beacon_field.py
	$< --time $@ three-center
field_three_center_time_nomax.%: src/beacon_field.py
	$< --time $@ three-center --max-rms 0
field_three_center_phase.%: src/beacon_field.py
	$< --phase $@ three-center
field_three_center_time_nomax.%: src/beacon_field.py
	$< --time $@ three-center --no-max


field_square: \
	field_square_all_time.pdf	field_square_all_time.png \
	field_square_all_phase.pdf	field_square_all_phase.png \
	field_square_ref0_time.pdf	field_square_ref0_time.png \
	field_square_ref0_phase.pdf	field_square_ref0_phase.png \
	field_square_all_time_zoomtx.pdf	field_square_all_time_zoomtx.png \
	field_square_all_phase_zoomtx.pdf	field_square_all_phase_zoomtx.png \
	field_square_ref0_time_zoomtx.pdf	field_square_ref0_time_zoomtx.png \
	field_square_ref0_phase_zoomtx.pdf	field_square_ref0_phase_zoomtx.png \
	#

field_square_ref0_time.%: src/beacon_field.py
	$< --time $@ square --ref 0
field_square_ref0_phase.%: src/beacon_field.py
	$< --phase $@ square --ref 0
field_square_all_time.%: src/beacon_field.py
	$< --time $@ square
field_square_all_phase.%: src/beacon_field.py
	$< --phase $@ square

field_square_ref0_time_zoomtx.%: src/beacon_field.py
	$< --time $@ square --ref 0 --zoom tx
field_square_ref0_phase_zoomtx.%: src/beacon_field.py
	$< --phase $@ square --ref 0 --zoom tx
field_square_all_time_zoomtx.%: src/beacon_field.py
	$< --time $@ square --zoom tx
field_square_all_phase_zoomtx.%: src/beacon_field.py
	$< --phase $@ square --zoom tx

