# $Id: Makefile,v 1.2 2006/01/12 08:34:15 dugsong Exp $

PYTHON	= python
PKGDIR	= pywtap-0.4

all: wtap.c
	$(PYTHON) setup.py build

wtap.c: wtap.pyx
	pyrexc wtap.pyx

install:
	$(PYTHON) setup.py install

test:
	$(PYTHON) test.py

pkg_win32:
	$(PYTHON) setup.py bdist_wininst

pkg_osx:
	bdist_mpkg --readme=README --license=LICENSE
	mv dist $(PKGDIR)
	hdiutil create -srcfolder $(PKGDIR) $(PKGDIR).dmg
	mv $(PKGDIR) dist

clean:
	$(PYTHON) setup.py clean
	rm -rf build dist $(PKGDIR).dmg

cleandir distclean: clean
	$(PYTHON) setup.py clean -a
	rm -f config.h *~
