#
# written by Markus F. X. J. Oberhumer <markus@oberhumer.com>
#
# to use a specific python version call
#   `make PYTHON=python2.2'
#

SHELL = /bin/sh

PYTHON = python2.2
PYTHON = python

all build:
	$(PYTHON) setup.py build

semi-static:
	$(PYTHON) setup.py build --semi-static

test: build
	$(PYTHON) test/playmus.py test/*.mp3 test/*.mod

# (strip needs GNU binutils)
strip: build
	strip -p --strip-unneeded build/lib*/*.so
	chmod -x build/lib*/*.so

install:
	$(PYTHON) setup.py install --root=${prefix}

clean:
	-rm -rf build
	-rm -f *.pyc *.pyo */*.pyc */*.pyo

distclean: clean
	-rm -f setup.py

maintainer-clean: distclean

.PHONY: all build semi-static test strip install clean distclean maintainer-clean

.NOEXPORT:
