Statistics
| Branch: | Tag: | Revision:

mininet / Makefile @ e0bf8ece

History | View | Annotate | Download (1.49 KB)

1
MININET = mininet/*.py
2
TEST = mininet/test/*.py
3
EXAMPLES = mininet/examples/*.py
4
MN = bin/mn
5
BIN = $(MN)
6
PYSRC = $(MININET) $(TEST) $(EXAMPLES) $(BIN)
7
MNEXEC = mnexec
8
MANPAGES = mn.1 mnexec.1
9
P8IGN = E251,E201,E302,E202
10
BINDIR = /usr/bin
11
MANDIR = /usr/share/man/man1
12
DOCDIRS = doc/html doc/latex
13
PDF = doc/latex/refman.pdf
14

    
15
CFLAGS += -Wall -Wextra
16

    
17
all: codecheck test
18

    
19
clean:
20
	rm -rf build dist *.egg-info *.pyc $(MNEXEC) $(MANPAGES) $(DOCDIRS)
21

    
22
codecheck: $(PYSRC)
23
	-echo "Running code check"
24
	util/versioncheck.py
25
	pyflakes $(PYSRC)
26
	pylint --rcfile=.pylint $(PYSRC)
27
	pep8 --repeat --ignore=$(P8IGN) $(PYSRC)
28

    
29
errcheck: $(PYSRC)
30
	-echo "Running check for errors only"
31
	pyflakes $(PYSRC)
32
	pylint -E --rcfile=.pylint $(PYSRC)
33

    
34
test: $(MININET) $(TEST)
35
	-echo "Running tests"
36
	mininet/test/test_nets.py
37
	mininet/test/test_hifi.py
38

    
39
mnexec: mnexec.c $(MN) mininet/net.py
40
	cc $(CFLAGS) $(LDFLAGS) -DVERSION=\"`PYTHONPATH=. $(MN) --version`\" $< -o $@
41

    
42
install: $(MNEXEC) $(MANPAGES)
43
	install $(MNEXEC) $(BINDIR)
44
	install $(MANPAGES) $(MANDIR)
45
	python setup.py install
46

    
47
develop: $(MNEXEC) $(MANPAGES)
48
	# Perhaps we should link these as well
49
	install $(MNEXEC) $(BINDIR)
50
	install $(MANPAGES) $(MANDIR)
51
	python setup.py develop
52

    
53
man: $(MANPAGES)
54

    
55
mn.1: $(MN)
56
	PYTHONPATH=. help2man -N -n "create a Mininet network." \
57
	--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

    
63
.PHONY: doc
64

    
65
doc: man
66
	doxygen doc/doxygen.cfg
67
	make -C doc/latex