POSY=$(wildcard ../test1/*.dump)

POSYFLOW=$(patsubst %.dump,%.flow,$(POSY))
POSYLR=$(patsubst %.dump,%.lr,$(POSY))
SKEWFLOW=$(patsubst %.dump,%.skew,$(POSY))

lrstep?=1e-3

.PHONY: all flow lr show $(POSYFLOW) $(POSYLR)

all: flow lr skew

flow: $(POSYFLOW)

skew: $(SKEWFLOW)

lr: $(POSYLR)

show:
	@echo $(POSY)
	@echo $(POSYFLOW)
	@echo $(POSYLR)
	@echo $(SKEWFLOW)

$(POSYFLOW):%.flow:%.dump
	./fs $< max_user=300 max_rounds=200 >$(notdir $@).log

$(SKEWFLOW):%.skew:%.dump
	./fs $< max_user=300 max_rounds=200 skew_opt=true >$(notdir $@).log

$(POSYLR):%.lr:%.dump
	./fs $< solver=fast_lr min_change=1e-6 max_user=600 max_rounds=5000 lr_step=$(lrstep) >$(notdir $@).log

