VPP-57 Add Doxygen to VPP

- Configures Doxygen.
- Adds a source filter to do magic on our use of the preprocessor to do
  constructor stuff to make Doxygen grok it better.
- Adds a convenience helper to the root Makefile.
- Adds a README.md to the root directory (and which Doxygem uses as its
  "mainpage".
- Add several other documentative files.
- Currently using SVG for call graphs, though this may have a
  load-time performance impact in browsers.

Change-Id: I25fc6fb5bf634319dcb36a7f0e32031921c125ac
Signed-off-by: Chris Luke <chrisy@flirble.org>
diff --git a/Makefile b/Makefile
index 8050f87..dee2566 100644
--- a/Makefile
+++ b/Makefile
@@ -39,7 +39,9 @@
 RPM_DEPENDS_GROUPS = 'Development Tools'
 RPM_DEPENDS  = redhat-lsb glibc-static java-1.8.0-openjdk-devel yum-utils
 RPM_DEPENDS += openssl-devel https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm apr-devel
+#RPM_DEPENDS += doxygen # TODO
 EPEL_DEPENDS = libconfuse-devel ganglia-devel
+#EPEL_DEPENDS += graphviz # TODO
 
 ifneq ($(wildcard $(STARTUP_DIR)/startup.conf),)
         STARTUP_CONF ?= $(STARTUP_DIR)/startup.conf
@@ -209,3 +211,26 @@
 cscope: cscope.files
 	@cscope -b -q -v
 
+
+DOXY_INPUT = \
+	README.md \
+	vppinfra \
+	svm \
+	vlib \
+	vlib-api \
+	vnet \
+	vpp \
+	vpp-api
+
+.PHONY: doxygen
+doxygen:
+	@mkdir -p "$(BR)/docs"
+	ROOT="$(WS_ROOT)" \
+	     BUILD_ROOT="$(BR)" \
+	     INPUT="$(addprefix $(WS_ROOT)/,$(DOXY_INPUT))" \
+	     HTML=YES \
+	     VERSION="`git describe --tags --dirty`" \
+	     doxygen doxygen/doxygen.cfg
+
+wipe-doxygen:
+	rm -rf "$(BR)/docs"