2 TEST = mininet/test/*.py
3 EXAMPLES = mininet/examples/*.py
6 PYMN = $(PYTHON) -B bin/mn
8 PYSRC = $(MININET) $(TEST) $(EXAMPLES) $(BIN)
10 MANPAGES = mn.1 mnexec.1
11 P8IGN = E251,E201,E302,E202,E126,E127,E203,E226
13 BINDIR ?= $(PREFIX)/bin
14 MANDIR ?= $(PREFIX)/share/man/man1
15 DOCDIRS = doc/html doc/latex
16 PDF = doc/latex/refman.pdf
18 CFLAGS += -Wall -Wextra
23 rm -rf build dist *.egg-info *.pyc $(MNEXEC) $(MANPAGES) $(DOCDIRS)
26 -echo "Running code check"
29 pylint --rcfile=.pylint $(PYSRC)
30 # Exclude miniedit from pep8 checking for now
31 pep8 --repeat --ignore=$(P8IGN) `ls $(PYSRC) | grep -v miniedit.py`
34 -echo "Running check for errors only"
36 pylint -E --rcfile=.pylint $(PYSRC)
38 test: $(MININET) $(TEST)
40 mininet/test/test_nets.py
41 mininet/test/test_hifi.py
44 -echo "Running slower tests (walkthrough, examples)"
45 mininet/test/test_walkthrough.py -v
46 mininet/examples/test/runner.py -v
48 mnexec: mnexec.c $(MN) mininet/net.py
49 cc $(CFLAGS) $(LDFLAGS) -DVERSION=\"`PYTHONPATH=. $(PYMN) --version`\" $< -o $@
51 install-mnexec: $(MNEXEC)
52 install -D $(MNEXEC) $(BINDIR)/$(MNEXEC)
54 install-manpages: $(MANPAGES)
55 install -D -t $(MANDIR) $(MANPAGES)
57 install: install-mnexec install-manpages
58 $(PYTHON) setup.py install
60 develop: $(MNEXEC) $(MANPAGES)
61 # Perhaps we should link these as well
62 install $(MNEXEC) $(BINDIR)
63 install $(MANPAGES) $(MANDIR)
64 $(PYTHON) setup.py develop
69 PYTHONPATH=. help2man -N -n "create a Mininet network." \
70 --no-discard-stderr "$(PYMN)" -o $@
73 help2man -N -n "execution utility for Mininet." \
74 -h "-h" -v "-v" --no-discard-stderr ./$< -o $@
79 doxygen doc/doxygen.cfg