@@ -85,6 +85,15 @@ def build(bld):
8585 VERSION = int (split [0 ]) * 1000000 + int (split [1 ]) * 1000 + int (split [2 ]),
8686 VERSION_MAJOR = split [0 ], VERSION_MINOR = split [1 ], VERSION_PATCH = split [2 ])
8787
88+ bld (features = "subst" ,
89+ name = "versioncpp-NFD" ,
90+ source = 'NFD/core/version.cpp.in' , target = 'NFD/core/version.cpp' ,
91+ install_path = None ,
92+ VERSION_STRING = base ,
93+ VERSION_BUILD = "%s-ndnSIM" % build ,
94+ VERSION = int (split [0 ]) * 1000000 + int (split [1 ]) * 1000 + int (split [2 ]),
95+ VERSION_MAJOR = split [0 ], VERSION_MINOR = split [1 ], VERSION_PATCH = split [2 ])
96+
8897 (base , build , split ) = bld .getVersion ('ndn-cxx' )
8998 bld (features = "subst" ,
9099 name = "version-ndn-cxx" ,
@@ -95,6 +104,12 @@ def build(bld):
95104 VERSION = int (split [0 ]) * 1000000 + int (split [1 ]) * 1000 + int (split [2 ]),
96105 VERSION_MAJOR = split [0 ], VERSION_MINOR = split [1 ], VERSION_PATCH = split [2 ])
97106
107+ bld .objects (
108+ target = 'version-NFD-objects' ,
109+ source = 'NFD/core/version.cpp' ,
110+ includes = '../../ns3/ndnSIM/NFD' ,
111+ use = 'version-NFD versioncpp-NFD' )
112+
98113 deps = ['core' , 'network' , 'point-to-point' , 'topology-read' , 'mobility' , 'internet' ]
99114 if 'ns3-visualizer' in bld .env ['NS3_ENABLED_MODULES' ]:
100115 deps .append ('visualizer' )
@@ -110,7 +125,7 @@ def build(bld):
110125 'ndn-cxx/ndn-cxx/detail/*osx.cpp' ,
111126 'ndn-cxx/ndn-cxx/net/network-interface.cpp' ])
112127
113- nfdSrc = bld .path .ant_glob (['%s/**/*.cpp' % dir for dir in ['NFD/core' , 'NFD/daemon' , 'NFD/rib' ]],
128+ nfdSrc = bld .path .ant_glob (['%s/**/*.cpp' % dir for dir in ['NFD/core' , 'NFD/daemon' ]],
114129 excl = ['NFD/daemon/main.cpp' ,
115130 'NFD/daemon/nfd.cpp' ,
116131 'NFD/daemon/face/*ethernet*' ,
@@ -123,7 +138,7 @@ def build(bld):
123138 module = bld .create_ns3_module ('ndnSIM' , deps )
124139 module .module = 'ndnSIM'
125140 module .features += ' ns3fullmoduleheaders ndncxxheaders'
126- module .use += ['version-ndn-cxx' , 'version-NFD' , 'BOOST' , 'SQLITE3' , 'RT' , 'PTHREAD' , 'OPENSSL' ]
141+ module .use += ['version-ndn-cxx' , 'version-NFD-objects ' , 'BOOST' , 'SQLITE3' , 'RT' , 'PTHREAD' , 'OPENSSL' ]
127142 module .includes = ['../..' , '../../ns3/ndnSIM/NFD' , './NFD/core' , './NFD/daemon' , './NFD/rib' , '../../ns3/ndnSIM' , '../../ns3/ndnSIM/ndn-cxx' ]
128143 module .export_includes = ['../../ns3/ndnSIM/NFD' , './NFD/core' , './NFD/daemon' , './NFD/rib' , '../../ns3/ndnSIM' ]
129144 if 'ns3-visualizer' in bld .env ['NS3_ENABLED_MODULES' ]:
@@ -142,7 +157,7 @@ def build(bld):
142157 excl = [
143158 'model/ip-faces/*' ]) + ndnCxxSrc + nfdSrc
144159
145- module_dirs = ['NFD/core' , 'NFD/daemon' , 'NFD/rib' , ' apps' , 'helper' , 'model' , 'utils' , 'bindings' ]
160+ module_dirs = ['NFD/core' , 'NFD/daemon' , 'apps' , 'helper' , 'model' , 'utils' , 'bindings' ]
146161 module .full_headers = bld .path .ant_glob (['%s/**/*.hpp' % dir for dir in module_dirs ])
147162 module .full_headers += bld .path .ant_glob ('NFD/common.hpp' )
148163
0 commit comments