blob: ee1909e5023afe14cb2507601a29e0a860282cf5 [file] [log] [blame]
Alexander Afanasyev262203b2015-01-26 16:39:59 -08001# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
2
3from waflib import Utils, Context
4
5top = '..'
6
7def build(bld):
8 # List all .cpp files (whole tool should be in one .cpp)
9 for i in bld.path.ant_glob(['*.cpp']):
10 name = str(i)[:-len(".cpp")]
11 bld(features=['cxx', 'cxxprogram'],
12 target="../bin/%s" % name,
13 source=[i] + bld.path.ant_glob(['%s/**/*.cpp' % name]),
Alexander Afanasyev3d1874a2016-06-15 12:25:01 -070014 use='core-objects NDN_CXX BOOST LIBRESOLV'
Alexander Afanasyev262203b2015-01-26 16:39:59 -080015 )
16
17 # List all directories files (tool can has multiple .cpp in the directory)
18 for name in bld.path.ant_glob(['*'], dir=True, src=False):
19 srcFiles = bld.path.ant_glob(['%s/**/*.cpp' % name])
20 if len(srcFiles) > 0:
21 bld(features=['cxx', 'cxxprogram'],
22 target="../bin/%s" % name,
23 source=srcFiles,
Alexander Afanasyev3d1874a2016-06-15 12:25:01 -070024 use='core-objects NDN_CXX BOOST LIBRESOLV',
Alexander Afanasyev262203b2015-01-26 16:39:59 -080025 includes='%s' % name,
26 )
27
28 bld(features="subst",
29 source=bld.path.ant_glob(['*.sh', '*.py']),
30 target=['../bin/%s' % node.change_ext('')
31 for node in bld.path.ant_glob(['*.sh', '*.py'])],
32 install_path="${BINDIR}",
33 chmod=Utils.O755,
34 VERSION=Context.g_module.VERSION
35 )
36
37 bld.install_files("${DATAROOTDIR}/ndn",
38 bld.path.ant_glob('nfd-status-http-server-files/*'))