PYTHONVER := $(shell python -c 'import sys; print sys.version[:3]')

_gdepth.so: _gdepth.c
	gcc -fPIC -Wall -g -O2 -I/usr/include/python$(PYTHONVER)/numarray -I/usr/include/python$(PYTHONVER) _gdepth.c -lGL -shared -o _gdepth.so && python -c 'import _gdepth'

spiral.png: gdepth.py _gdepth.so spiral.ngc
	python gdepth.py spiral.ngc

