Exemplo n.º 1
0
def get_compile_tasks():
    tasks = []

    for source in SOURCES:
        obj = _globals.source_to_obj_path(source, OBJ_DIR)
        dep = _globals.source_to_dep_path(source, OBJ_DIR)
        if obj in DEPS:
            dependencies = DEPS[obj]
        else:
            dependencies = [source]
        tasks.append({
            'name': source.replace('.c', '.o'),
            'actions': [(create_folder, [os.path.dirname(obj)]),
                        gcc_utils.get_compile_cmd_str(source, obj,
                                                      compiler=COMPILER,
                                                      defs=COMPILER_DEFINITIONS,
                                                      includes=COMPILER_INCLUDE_DIRS,
                                                      flags=COMPILER_FLAGS)],
            'targets': [obj, dep],
            'file_dep': dependencies,
            'clean': True
        })
    return tasks
Exemplo n.º 2
0
def get_cpp_compile_command_str(source, obj):
    return gcc_utils.get_compile_cmd_str(source, obj,
                                         compiler=ARDUINO_ENV.cpp_compiler,
                                         defs=CPP_DEFS,
                                         includes=INCLUDE_DIRS,
                                         flags=ARDUINO_ENV.cppflags)