Exemple #1
0
    def __init__(self):
        self.c_sources = []
        self.cpp_sources = []
        for path in SOURCE_DIRS:
            self.c_sources += file_utils.find(path, '*.c')
            self.cpp_sources += file_utils.find(path, ['*.cpp', '*.ino'])

        self.objs = [self.get_obj_path(x) for x in self.c_sources + self.cpp_sources]
        self.objs += [ARDUINO_ENV.core_lib_output_path]

        self.deps = gcc_utils.get_dependency_dict(BUILD_DIR)
SOURCE_DIRS = [
    _globals.from_proj_root('source'),
    _globals.from_proj_root('test', 'unit_test_harness', 'Unity'),
    _globals.from_proj_root('test', 'unit_tests')
]

SOURCES = []
for sdir in SOURCE_DIRS:
    SOURCES += file_utils.find(sdir, '*.c')

# Add generated source manually
SOURCES += [UNIT_TEST_RUNNER_SOURCE]

OBJECTS = [_globals.source_to_obj_path(source, OBJ_DIR) for source in SOURCES]

DEPS = gcc_utils.get_dependency_dict(OBJ_DIR)

EXE_TARGET_NAME = _globals.get_exe_target_name(NAME, 'exe')

EXE_TARGET = os.path.join(BUILD_DIR, EXE_TARGET_NAME)


#-----------------------------------------------------------
# Doit task generators


def get_all_tasks():
    tasks = get_code_gen_tasks() + get_compile_tasks() + get_link_tasks()
    tasks += get_run_test_tasks()
    return tasks