NFD+ci+docs: Attaching NFD as a submodule

Based on NFD:commit:27be0b0d41235609bee703f4f2ef9e5b1978fdce (version 0.2.0-74-g27be0b0)

Change-Id: I7f9117b226aa244e257375f7f4c045dc9c4cd897
Refs: #3124
diff --git a/wscript b/wscript
index a0e0adc..53fc23f 100644
--- a/wscript
+++ b/wscript
@@ -13,12 +13,12 @@
 
 def options(opt):
     opt.load(['dependency-checker',
-              'doxygen', 'sphinx_build', 'type_traits', 'compiler-features'],
+              'doxygen', 'sphinx_build', 'type_traits', 'compiler-features', 'version'],
              tooldir=['%s/.waf-tools' % opt.path.abspath()])
 
 def configure(conf):
     conf.load(['dependency-checker',
-               'doxygen', 'sphinx_build', 'type_traits', 'compiler-features'])
+               'doxygen', 'sphinx_build', 'type_traits', 'compiler-features', 'version'])
 
     conf.env['ENABLE_NDNSIM']=False
 
@@ -72,7 +72,18 @@
 
     conf.report_optional_feature("ndnSIM", "ndnSIM", True, "")
 
+    conf.write_config_header('NFD/config.hpp', remove=False)
+
 def build(bld):
+    (base, build, split) = bld.getVersion('NFD')
+    bld(features="subst",
+        source='NFD/version.hpp.in', target='NFD/version.hpp',
+        install_path=None,
+        VERSION_STRING=base,
+        VERSION_BUILD="%s-ndnSIM" % build,
+        VERSION=int(split[0]) * 1000000 + int(split[1]) * 1000 + int(split[2]),
+        VERSION_MAJOR=split[0], VERSION_MINOR=split[1], VERSION_PATCH=split[2])
+
     deps = ['core', 'network', 'point-to-point', 'topology-read', 'mobility', 'internet']
     if 'ns3-visualizer' in bld.env['NS3_ENABLED_MODULES']:
         deps.append('visualizer')
@@ -95,10 +106,19 @@
         bld.env['MODULES_NOT_BUILT'].append('ndnSIM')
         return
 
-    module_dirs = ['NFD', 'apps', 'helper', 'model', 'utils']
+    module_dirs = ['NFD/core', 'NFD/daemon', 'apps', 'helper', 'model', 'utils']
 
     module.source = bld.path.ant_glob(['%s/**/*.cpp' % dir for dir in module_dirs],
-                                      excl=['model/ip-faces/*'])
+                                      excl=['model/ip-faces/*',
+                                            'NFD/core/network-interface.cpp',
+                                            'NFD/daemon/main.cpp',
+                                            'NFD/daemon/nfd.*',
+                                            'NFD/daemon/face/ethernet*',
+                                            'NFD/daemon/face/multicast-udp*',
+                                            'NFD/daemon/face/tcp*',
+                                            'NFD/daemon/face/udp*',
+                                            'NFD/daemon/face/unix-stream*',
+                                            'NFD/daemon/face/websocket*'])
 
     module.full_headers = [p.path_from(bld.path) for p in bld.path.ant_glob(
         ['%s/**/*.hpp' % dir for dir in module_dirs])]