Statistics
| Branch: | Tag: | Revision:

mininet / Makefile @ d85a58fe

History | View | Annotate | Download (1.27 KB)

1 ac9554d6 Bob Lantz
MININET = mininet/*.py
2
TEST = mininet/test/*.py
3 26266932 Bob Lantz
EXAMPLES = examples/*.py
4 f2e7884a Bob Lantz
MN = bin/mn
5
BIN = $(MN)
6 26266932 Bob Lantz
PYSRC = $(MININET) $(TEST) $(EXAMPLES) $(BIN)
7 ee222055 Bob Lantz
MNEXEC = mnexec
8 d85a58fe Bob Lantz
MANPAGES = mn.1 mnexec.1
9 82b72072 Bob Lantz
P8IGN = E251,E201,E302,E202
10 78b2f585 Bob Lantz
BINDIR = /usr/bin
11
MANDIR = /usr/share/man/man1
12 80a8fa62 Bob Lantz
13 ee222055 Bob Lantz
all: codecheck test
14
15
clean:
16 d85a58fe Bob Lantz
	rm -rf build dist *.egg-info *.pyc $(MNEXEC) $(MANPAGES)
17 ee222055 Bob Lantz
18 ac9554d6 Bob Lantz
codecheck: $(PYSRC)
19 2b03a115 Bob Lantz
	-echo "Running code check"
20 ac9554d6 Bob Lantz
	pyflakes $(PYSRC)
21
	pylint --rcfile=.pylint $(PYSRC)
22 26266932 Bob Lantz
	pep8 --repeat --ignore=$(P8IGN) $(PYSRC)
23 ac9554d6 Bob Lantz
24 e6d8e974 Bob Lantz
errcheck: $(PYSRC)
25
	-echo "Running check for errors only"
26
	pyflakes $(PYSRC)
27
	pylint -E --rcfile=.pylint $(PYSRC)
28
29 ac9554d6 Bob Lantz
test: $(MININET) $(TEST)
30 2b03a115 Bob Lantz
	-echo "Running tests"
31 723d068c Brandon Heller
	mininet/test/test_nets.py
32 281f6e59 Bob Lantz
33 78b2f585 Bob Lantz
install: $(MNEXEC) $(MANPAGE)
34
	install $(MNEXEC) $(BINDIR)
35
	install $(MANPAGE) $(MANDIR)
36 281f6e59 Bob Lantz
	python setup.py install
37
38 78b2f585 Bob Lantz
develop: $(MNEXEC) $(MANPAGE)
39
	# Perhaps we should link these as well
40
	install $(MNEXEC) $(BINDIR)
41
	install $(MANPAGE) $(MANDIR)
42 ee222055 Bob Lantz
	python setup.py develop
43
44 d85a58fe Bob Lantz
man: $(MANPAGES)
45 f2e7884a Bob Lantz
46 d85a58fe Bob Lantz
mn.1: $(MN)
47 d54cde46 Bob Lantz
	PYTHONPATH=. help2man -N -n "create a Mininet network." \
48 d85a58fe Bob Lantz
	--no-discard-stderr $< -o $@
49
50
mnexec: mnexec.c $(MN) mininet/net.py
51
	cc -DVERSION=\"`$(MN) --version`\" $< -o $@
52
53
mnexec.1: mnexec
54
	help2man -N -n "execution utility for Mininet." \
55
	-h "-h" -v "-v" --no-discard-stderr ./$< -o $@ 
56 f2e7884a Bob Lantz
57
doc: man
58 8a130dea Bob Lantz
	doxygen doxygen.cfg