GRAPH = graph
JS = /usr/users/wwwifa/docs/subatom/nucltheo/bin/js

all: graph.png graph.ps

graph.png: graph.txt
	$(GRAPH) \
		--width 0.65 --height 0.65 \
		--display-type png \
		--x-label "x" --y-label "y" \
		--top-label "Least squares fit" \
		graph.txt > graph.png

graph.ps: graph.txt
	$(GRAPH) \
		--width 0.65 --height 0.65 \
		--display-type ps \
		--x-label "x" --y-label "y" \
		--top-label "Least squares fit" \
		graph.txt > graph.ps

graph.txt: makefile main.js lsfit.js ../utils.js ../QR/qrdec.js ../QR/inverse.js
	$(JS) main.js > graph.txt

clean:
	rm -f graph.txt graph.png graph.ps
