Add basic consumer/producer examples
Change-Id: Iee77509efb1ed1444314072c7e03384df4f30d3c
diff --git a/examples/wscript b/examples/wscript
new file mode 100644
index 0000000..2620281
--- /dev/null
+++ b/examples/wscript
@@ -0,0 +1,25 @@
+# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+top = '..'
+
+def build(bld):
+ # List all .cpp files (whole example should be in one .cpp)
+ for example in bld.path.ant_glob(['*.cpp']):
+ name = example.change_ext('').path_from(bld.path.get_bld())
+ bld(features=['cxx', 'cxxprogram'],
+ target=name,
+ source=[example] + bld.path.ant_glob(['%s/**/*.cpp' % name]),
+ use='NDN_CXX libndn-nac',
+ install_path=None
+ )
+
+ # List all directories files (example can has multiple .cpp in the directory)
+ for name in bld.path.ant_glob(['*'], dir=True, src=False):
+ name = subdir.path_from(bld.path)
+ bld(features=['cxx', 'cxxprogram'],
+ target="%s/%s" % (name, name),
+ source=bld.path.ant_glob(['%s/**/*.cpp' % name]),
+ use='NDN_CXX libndn-nac',
+ install_path=None,
+ includes='%s' % name,
+ )