Statistics
| Branch: | Tag: | Revision:

mininet / Makefile @ d85a58fe

History | View | Annotate | Download (1.27 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

    
13
all: codecheck test
14

    
15
clean:
16
	rm -rf build dist *.egg-info *.pyc $(MNEXEC) $(MANPAGES)
17

    
18
codecheck: $(PYSRC)
19
	-echo "Running code check"
20
	pyflakes $(PYSRC)
21
	pylint --rcfile=.pylint $(PYSRC)
22
	pep8 --repeat --ignore=$(P8IGN) $(PYSRC)
23

    
24
errcheck: $(PYSRC)
25
	-echo "Running check for errors only"
26
	pyflakes $(PYSRC)
27
	pylint -E --rcfile=.pylint $(PYSRC)
28

    
29
test: $(MININET) $(TEST)
30
	-echo "Running tests"
31
	mininet/test/test_nets.py
32

    
33
install: $(MNEXEC) $(MANPAGE)
34
	install $(MNEXEC) $(BINDIR)
35
	install $(MANPAGE) $(MANDIR)
36
	python setup.py install
37

    
38
develop: $(MNEXEC) $(MANPAGE)
39
	# Perhaps we should link these as well
40
	install $(MNEXEC) $(BINDIR)
41
	install $(MANPAGE) $(MANDIR)
42
	python setup.py develop
43

    
44
man: $(MANPAGES)
45

    
46
mn.1: $(MN)
47
	PYTHONPATH=. help2man -N -n "create a Mininet network." \
48
	--no-discard-stderr $< -o $@
49

    
50
mnexec: mnexec.c $(MN) mininet/net.py
51
	cc -DVERSION=\"`$(MN) --version`\" $< -o $@
52

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

    
57
doc: man
58
	doxygen doxygen.cfg
59