Statistics
| Branch: | Tag: | Revision:

mininet / Makefile @ 9c0ed88c

History | View | Annotate | Download (1.33 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
	util/versioncheck.py
21
	pyflakes $(PYSRC)
22
	pylint --rcfile=.pylint $(PYSRC)
23
	pep8 --repeat --ignore=$(P8IGN) $(PYSRC)
24

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

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

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

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

    
45
man: $(MANPAGES)
46

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

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

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

    
58
doc: man
59
	doxygen doxygen.cfg
60