chiark / gitweb /
Add build system. Fix import.
[checkpath-python] / Makefile
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..e414f7b
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+## Makefile
+
+PYTHON = python
+PYREXC = pyrexc
+prefix = /usr/local
+
+all: setup.py checkpath.c
+       $(PYTHON) setup.py build
+
+clean: setup.py
+       $(PYTHON) setup.py clean
+       rm -rf build checkpath.c
+
+checkpath.c: checkpath.pyx
+       pyrexc -o $@.new checkpath.pyx
+       mv $@.new $@
+
+dist: setup.py checkpath.c
+       $(PYTHON) setup.py sdist
+
+install: setup.py checkpath.c
+       $(PYTHON) setup.py install --prefix $(prefix)
+
+.PHONY: all clean dist install