Statistics
| Branch: | Tag: | Revision:

mininet / Makefile @ e0bf8ece

History | View | Annotate | Download (1.49 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
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 31015ef5 Bob Lantz
DOCDIRS = doc/html doc/latex
13
PDF = doc/latex/refman.pdf
14 80a8fa62 Bob Lantz
15 8842e450 Jose Pedro Oliveira
CFLAGS += -Wall -Wextra
16
17 ee222055 Bob Lantz
all: codecheck test
18
19
clean:
20 31015ef5 Bob Lantz
	rm -rf build dist *.egg-info *.pyc $(MNEXEC) $(MANPAGES) $(DOCDIRS)
21 ee222055 Bob Lantz
22 ac9554d6 Bob Lantz
codecheck: $(PYSRC)
23 2b03a115 Bob Lantz
	-echo "Running code check"
24 9c0ed88c Bob Lantz
	util/versioncheck.py
25 ac9554d6 Bob Lantz
	pyflakes $(PYSRC)
26
	pylint --rcfile=.pylint $(PYSRC)
27 26266932 Bob Lantz
	pep8 --repeat --ignore=$(P8IGN) $(PYSRC)
28 ac9554d6 Bob Lantz
29 e6d8e974 Bob Lantz
errcheck: $(PYSRC)
30
	-echo "Running check for errors only"
31
	pyflakes $(PYSRC)
32
	pylint -E --rcfile=.pylint $(PYSRC)
33
34 ac9554d6 Bob Lantz
test: $(MININET) $(TEST)
35 2b03a115 Bob Lantz
	-echo "Running tests"
36 723d068c Brandon Heller
	mininet/test/test_nets.py
37 e1205a8a Brandon Heller
	mininet/test/test_hifi.py
38 281f6e59 Bob Lantz
39 31015ef5 Bob Lantz
mnexec: mnexec.c $(MN) mininet/net.py
40
	cc $(CFLAGS) $(LDFLAGS) -DVERSION=\"`PYTHONPATH=. $(MN) --version`\" $< -o $@
41
42 ce823507 Bob Lantz
install: $(MNEXEC) $(MANPAGES)
43 78b2f585 Bob Lantz
	install $(MNEXEC) $(BINDIR)
44 9d5a21a7 Bob Lantz
	install $(MANPAGES) $(MANDIR)
45 281f6e59 Bob Lantz
	python setup.py install
46
47 9d5a21a7 Bob Lantz
develop: $(MNEXEC) $(MANPAGES)
48 78b2f585 Bob Lantz
	# Perhaps we should link these as well
49
	install $(MNEXEC) $(BINDIR)
50 ce823507 Bob Lantz
	install $(MANPAGES) $(MANDIR)
51 ee222055 Bob Lantz
	python setup.py develop
52
53 d85a58fe Bob Lantz
man: $(MANPAGES)
54 f2e7884a Bob Lantz
55 d85a58fe Bob Lantz
mn.1: $(MN)
56 d54cde46 Bob Lantz
	PYTHONPATH=. help2man -N -n "create a Mininet network." \
57 d85a58fe Bob Lantz
	--no-discard-stderr $< -o $@
58
59
mnexec.1: mnexec
60
	help2man -N -n "execution utility for Mininet." \
61
	-h "-h" -v "-v" --no-discard-stderr ./$< -o $@ 
62 f2e7884a Bob Lantz
63 31015ef5 Bob Lantz
.PHONY: doc
64 281f6e59 Bob Lantz
65 31015ef5 Bob Lantz
doc: man
66
	doxygen doc/doxygen.cfg
67
	make -C doc/latex