Skip to content
Snippets Groups Projects
Makefile 1.57 KiB
Newer Older
MININET = mininet/*.py
TEST = mininet/test/*.py
EXAMPLES = mininet/examples/*.py
MN = bin/mn
BIN = $(MN)
PYSRC = $(MININET) $(TEST) $(EXAMPLES) $(BIN)
MANPAGES = mn.1 mnexec.1
Bob Lantz's avatar
Bob Lantz committed
P8IGN = E251,E201,E302,E202
BINDIR = /usr/bin
MANDIR = /usr/share/man/man1
DOCDIRS = doc/html doc/latex
PDF = doc/latex/refman.pdf
CFLAGS += -Wall -Wextra
PLFMT = --msg-template='{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}'
	rm -rf build dist *.egg-info *.pyc $(MNEXEC) $(MANPAGES) $(DOCDIRS)
	util/versioncheck.py
	pylint $(PLFMT) --rcfile=.pylint $(PYSRC)
	pep8 --repeat --ignore=$(P8IGN) $(PYSRC)
errcheck: $(PYSRC)
	-echo "Running check for errors only"
	pyflakes $(PYSRC)
	pylint -E --rcfile=.pylint $(PYSRC)

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

Bob Lantz's avatar
Bob Lantz committed
install: $(MNEXEC) $(MANPAGES)
Bob Lantz's avatar
Bob Lantz committed
	install $(MANPAGES) $(MANDIR)
	python setup.py install

Bob Lantz's avatar
Bob Lantz committed
develop: $(MNEXEC) $(MANPAGES)
	# Perhaps we should link these as well
	install $(MNEXEC) $(BINDIR)
Bob Lantz's avatar
Bob Lantz committed
	install $(MANPAGES) $(MANDIR)
man: $(MANPAGES)
mn.1: $(MN)
	PYTHONPATH=. help2man -N -n "create a Mininet network." \
	--no-discard-stderr $< -o $@

mnexec.1: mnexec
	help2man -N -n "execution utility for Mininet." \
	-h "-h" -v "-v" --no-discard-stderr ./$< -o $@
doc: man
	doxygen doc/doxygen.cfg
	make -C doc/latex