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);
15 modules = [ 'core', 'io', 'xml', 'app', 'http', 'comm', 'timex', 'http', 'statistics', 'time', 'diameter', 'diameter_comm' ];
16 for module in modules:
17 anna_libs.append ("anna_" + module)
18 module = module.replace("_", ".")
19 kk = pwd.replace (pPath, ("source/" + module + "/"))
20 anna_libpaths.append (pwd.replace (pPath, ("source/" + module + "/")))
22 anna_rlibs = list(anna_libs)
25 # Libraries ###############################################################
26 # To avoid other libraries accumulation:
27 localEnv = env.Clone()
29 anna_library = { 'LIBS' : anna_rlibs }
30 localEnv.MergeFlags (anna_library)
32 system_library = { 'LIBS' : [ 'xml2', 'rt', 'pthread' ] }
33 localEnv.MergeFlags (system_library)
35 localEnv.Append(LIBPATH = anna_libpaths)
38 # Linking #################################################################
40 # Process includes (avoid mandatory using of quoted includes and ../ paths from testing directory):
41 current_directory = Dir ('.').abspath
42 testing_include = os.path.join (current_directory, "testing")
43 localEnv.Append (CPPPATH = [current_directory, testing_include])
45 result = localEnv.Program (pName, Glob ('*.cpp') + Glob ('testing/*.cpp'))