Statistics
| Branch: | Tag: | Revision:

mininet / Makefile @ master

History | View | Annotate | Download (1.79 KB)

1 ac9554d6 Bob Lantz
MININET = mininet/*.py
2
TEST = mininet/test/*.py
3 0c5aae15 Bob Lantz
EXAMPLES = mininet/examples/*.py
4 f2e7884a Bob Lantz
MN = bin/mn
5 cdbbb5b7 Tomasz Buchert
PYMN = python -B bin/mn
6 f2e7884a Bob Lantz
BIN = $(MN)
7 26266932 Bob Lantz
PYSRC = $(MININET) $(TEST) $(EXAMPLES) $(BIN)
8 ee222055 Bob Lantz
MNEXEC = mnexec
9 d85a58fe Bob Lantz
MANPAGES = mn.1 mnexec.1
10 7a3159c9 Bob Lantz
P8IGN = E251,E201,E302,E202,E126,E127,E203,E226
11 78b2f585 Bob Lantz
BINDIR = /usr/bin
12
MANDIR = /usr/share/man/man1
13 31015ef5 Bob Lantz
DOCDIRS = doc/html doc/latex
14
PDF = doc/latex/refman.pdf
15 80a8fa62 Bob Lantz
16 8842e450 Jose Pedro Oliveira
CFLAGS += -Wall -Wextra
17
18 ee222055 Bob Lantz
all: codecheck test
19
20
clean:
21 31015ef5 Bob Lantz
	rm -rf build dist *.egg-info *.pyc $(MNEXEC) $(MANPAGES) $(DOCDIRS)
22 ee222055 Bob Lantz
23 2e3258d2 Luca Baldesi
deb: 
24
	debuild -i -us -uc -b
25
26 ac9554d6 Bob Lantz
codecheck: $(PYSRC)
27 2b03a115 Bob Lantz
	-echo "Running code check"
28 9c0ed88c Bob Lantz
	util/versioncheck.py
29 ac9554d6 Bob Lantz
	pyflakes $(PYSRC)
30 908e85d9 Bob Lantz
	pylint --rcfile=.pylint $(PYSRC)
31 beeea4b2 Bob Lantz
#	Exclude miniedit from pep8 checking for now
32
	pep8 --repeat --ignore=$(P8IGN) `ls $(PYSRC) | grep -v miniedit.py`
33 ac9554d6 Bob Lantz
34 e6d8e974 Bob Lantz
errcheck: $(PYSRC)
35
	-echo "Running check for errors only"
36
	pyflakes $(PYSRC)
37
	pylint -E --rcfile=.pylint $(PYSRC)
38
39 ac9554d6 Bob Lantz
test: $(MININET) $(TEST)
40 2b03a115 Bob Lantz
	-echo "Running tests"
41 723d068c Brandon Heller
	mininet/test/test_nets.py
42 e1205a8a Brandon Heller
	mininet/test/test_hifi.py
43 281f6e59 Bob Lantz
44 03461ce9 Bob Lantz
slowtest: $(MININET)
45
	-echo "Running slower tests (walkthrough, examples)"
46
	mininet/test/test_walkthrough.py -v
47
	mininet/examples/test/runner.py -v
48
49 31015ef5 Bob Lantz
mnexec: mnexec.c $(MN) mininet/net.py
50 cdbbb5b7 Tomasz Buchert
	cc $(CFLAGS) $(LDFLAGS) -DVERSION=\"`PYTHONPATH=. $(PYMN) --version`\" $< -o $@
51 31015ef5 Bob Lantz
52 ce823507 Bob Lantz
install: $(MNEXEC) $(MANPAGES)
53 78b2f585 Bob Lantz
	install $(MNEXEC) $(BINDIR)
54 9d5a21a7 Bob Lantz
	install $(MANPAGES) $(MANDIR)
55 281f6e59 Bob Lantz
	python setup.py install
56
57 9d5a21a7 Bob Lantz
develop: $(MNEXEC) $(MANPAGES)
58 beeea4b2 Bob Lantz
# 	Perhaps we should link these as well
59 78b2f585 Bob Lantz
	install $(MNEXEC) $(BINDIR)
60 ce823507 Bob Lantz
	install $(MANPAGES) $(MANDIR)
61 ee222055 Bob Lantz
	python setup.py develop
62
63 d85a58fe Bob Lantz
man: $(MANPAGES)
64 f2e7884a Bob Lantz
65 d85a58fe Bob Lantz
mn.1: $(MN)
66 d54cde46 Bob Lantz
	PYTHONPATH=. help2man -N -n "create a Mininet network." \
67 cdbbb5b7 Tomasz Buchert
	--no-discard-stderr "$(PYMN)" -o $@
68 d85a58fe Bob Lantz
69
mnexec.1: mnexec
70
	help2man -N -n "execution utility for Mininet." \
71 db45b7c6 Bob Lantz
	-h "-h" -v "-v" --no-discard-stderr ./$< -o $@
72 f2e7884a Bob Lantz
73 31015ef5 Bob Lantz
.PHONY: doc
74 281f6e59 Bob Lantz
75 31015ef5 Bob Lantz
doc: man
76
	doxygen doc/doxygen.cfg
77
	make -C doc/latex