## default normaliz bin
ifndef (QNORMALIZ)
  QNORMALIZ = ../Qsource/Qnormaliz
endif


#NORMPARA += -c
#NORMPARA += -x=1
DIFF = diff -b
#NICE = nice -n19


TEST_FILES_S = $(patsubst %.in,%.diff,$(wildcard test-s/*.in))

all: tests
tests: $(TEST_FILES_S)

#compare rule
%.diff: %.out %.ref
	$(DIFF) $*.ref $*.out > $*.diff

#rules to generate the test files
test-s/%.out: $(QNORMALIZ) test-s/%.in
	$(NICE) $(QNORMALIZ) $(NORMPARA) -s test-s/$*

clean:
	-rm -f test-*/*.diff

distclean: clean
	-rm -f test-*/*.out

.PRECIOUS: test-s/%.out

.PHONY: all tests clean distclean
