Statistics
| Branch: | Tag: | Revision:

mininet / Makefile @ 31015ef5

History | View | Annotate | Download (1.43 KB)

1
MININET = mininet/*.py
2
TEST = mininet/test/*.py
3
EXAMPLES = 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
all: codecheck test
16

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

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

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

    
32
test: $(MININET) $(TEST)
33
	-echo "Running tests"
34
	mininet/test/test_nets.py
35

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

    
39
install: $(MNEXEC) $(MANPAGES)
40
	install $(MNEXEC) $(BINDIR)
41
	install $(MANPAGES) $(MANDIR)
42
	python setup.py install
43

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

    
50
man: $(MANPAGES)
51

    
52
mn.1: $(MN)
53
	PYTHONPATH=. help2man -N -n "create a Mininet network." \
54
	--no-discard-stderr $< -o $@
55

    
56
mnexec.1: mnexec
57
	help2man -N -n "execution utility for Mininet." \
58
	-h "-h" -v "-v" --no-discard-stderr ./$< -o $@ 
59

    
60
.PHONY: doc
61

    
62
doc: man
63
	doxygen doc/doxygen.cfg
64
	make -C doc/latex