diff --git a/wscript b/wscript
new file mode 100644
index 0000000..efbb69f
--- /dev/null
+++ b/wscript
@@ -0,0 +1,87 @@
+# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+"""
+Copyright (c) 2014-2015,  Regents of the University of California,
+                          Arizona Board of Regents,
+                          Colorado State University,
+                          University Pierre & Marie Curie, Sorbonne University,
+                          Washington University in St. Louis,
+                          Beijing Institute of Technology
+
+This file is part of NFD (Named Data Networking Forwarding Daemon).
+See AUTHORS.md for complete list of NFD authors and contributors.
+
+NFD is free software: you can redistribute it and/or modify it under the terms
+of the GNU General Public License as published by the Free Software Foundation,
+either version 3 of the License, or (at your option) any later version.
+
+NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+"""
+
+
+VERSION='0.1'
+APPNAME='ndn-atmos'
+
+from waflib import Configure, Utils, Logs, Context
+import os
+
+def options(opt):
+    opt.load(['compiler_cxx', 'gnu_dirs'])
+
+    opt.load(['default-compiler-flags', 'boost'],
+              tooldir=['.waf-tools'])
+
+    opt = opt.add_option_group('ndn-atmos Options')
+
+    opt.add_option('--with-tests', action='store_true', default=False,
+                   dest='with_tests', help='''build unit tests''')
+
+def configure(conf):
+    conf.load(['compiler_cxx', 'default-compiler-flags', 'boost', 'gnu_dirs'])
+
+    conf.find_program('bash', var='BASH')
+
+    if not os.environ.has_key('PKG_CONFIG_PATH'):
+        os.environ['PKG_CONFIG_PATH'] = ':'.join([
+            '/usr/local/lib/pkgconfig',
+            '/opt/local/lib/pkgconfig'])
+
+    conf.check_cfg(package='libndn-cxx', args=['--cflags', '--libs'],
+                   uselib_store='NDN_CXX', mandatory=True)
+
+    conf.check_cfg (package='ChronoSync', args=['ChronoSync >= 0.1', '--cflags', '--libs'],
+                    uselib_store='SYNC', mandatory=True)
+
+    boost_libs = 'system random thread filesystem'
+
+    if conf.options.with_tests:
+        conf.env['WITH_TESTS'] = 1
+        conf.define('WITH_TESTS', 1);
+        boost_libs += ' unit_test_framework'
+
+    conf.check_boost(lib=boost_libs, mandatory=True)
+    if conf.env.BOOST_VERSION_NUMBER < 104800:
+        Logs.error("Minimum required boost version is 1.48.0")
+        Logs.error("Please upgrade your distribution or install custom boost libraries" +
+                    " (http://redmine.named-data.net/projects/nfd/wiki/Boost_FAQ)")
+        return
+
+    conf.write_config_header('config.h')
+
+def build (bld):
+    bld(
+        target="bin/ndn-atmos",
+        features=['cxx', 'cxxprogram'],
+        source=bld.path.ant_glob(['catalog/src/*.cpp']),
+        includes="catalog/src .",
+        use="ndn-cxx BOOST SYNC"
+    )
+
+    # Catalog unit tests
+    if bld.env['WITH_TESTS']:
+        bld.recurse('catalog/tests')
