1#!/usr/bin/env python3 2# coding=utf-8 3import os 4from scripts import common_env 5Import('env') 6Import('env_cfg') 7Import('module') 8 9module_path = env_cfg.get_module_dir(module) 10obj_path = env_cfg.obj_path 11module_libs = env_cfg.get_module_libs(module) 12libs = [] 13 14env = env.Clone() 15env_cfg.append_environs(env, module) 16common_env.print_log_env(env, env_cfg.get_module_dir(module)) 17 18for lib in module_libs: 19 print('lib_name:', lib) 20 src_path = module_libs[lib] 21 objs = [] 22 for src in src_path: 23 objs += env.SConscript(os.path.join(src, 'SConscript'), {'env':env}, variant_dir = os.path.join('#', obj_path, module_path, src), duplicate = 0) 24 libs += env.Library(lib, objs) 25Return('libs') 26 27 28