initial import code into git
[tools/mic.git] / Makefile
1 PYTHON ?= python
2 VERSION = $(shell cat VERSION)
3 TAGVER = $(shell cat VERSION | sed -e "s/\([0-9\.]*\).*/\1/")
4
5 PKGNAME = micng
6
7 ifeq ($(VERSION), $(TAGVER))
8         TAG = $(TAGVER)
9 else
10         TAG = "HEAD"
11 endif
12
13
14 all:
15         $(PYTHON) setup.py build
16
17 dist-bz2:
18         git archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ $(TAG) | \
19                 bzip2  > $(PKGNAME)-$(VERSION).tar.bz2
20
21 dist-gz:
22         git archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ $(TAG) | \
23                 gzip  > $(PKGNAME)-$(VERSION).tar.gz
24
25 install: all
26         $(PYTHON) setup.py install --root=${DESTDIR}
27
28 develop: all
29         $(PYTHON) setup.py develop
30
31 clean:
32         rm -f tools/*.py[co]
33         rm -rf *.egg-info
34         rm -rf build/
35         rm -rf dist/