4 # Process #################################################################
5 #pName = "example_<module>_<process>"
6 bnames = Dir('..').abspath.rsplit('/', 2)
7 pName = "example_" + bnames[-2] + "_" + bnames[-1]
8 pPath = pName.replace("_", "/") + "/"
10 # Anna modules ############################################################
11 pwd = str(Dir ('.').abspath);
14 modules = [ 'core', 'io', 'xml', 'app', 'http', 'comm', 'timex', 'http', 'statistics', 'time', 'diameter', 'diameter_comm' ];
15 for module in modules:
16 anna_libs.append ("anna_" + module)
17 module = module.replace("_", ".")
18 anna_libpaths.append (pwd.replace (pPath, ("source/" + module + "/")))
20 anna_rlibs = list(anna_libs)
23 # Libraries ###############################################################
24 # To avoid other libraries accumulation:
25 localEnv = env.Clone()
27 anna_library = { 'LIBS' : anna_rlibs }
28 localEnv.MergeFlags (anna_library)
30 system_library = { 'LIBS' : [ 'xml2', 'rt', 'pthread' ] }
31 localEnv.MergeFlags (system_library)
33 localEnv.Append(LIBPATH = anna_libpaths)
35 # Linking #################################################################
37 # Process includes (avoid mandatory using of quoted includes and ../ paths from testing directory):
38 current_directory = Dir ('.').abspath
39 testing_include = os.path.join (current_directory, "testing")
40 localEnv.Append (CPPPATH = [current_directory, testing_include])
42 result = localEnv.Program (pName, Glob ('*.cpp') + Glob ('testing/*.cpp'))