| 31 | |
| 32 | |
| 33 | def parse_makefile(makefile): |
| 34 | with open(makefile, 'r', encoding='utf-8') as file: |
| 35 | current_lib = '' |
| 36 | for line in file.read().splitlines(): |
| 37 | if current_lib: |
| 38 | source = line.split()[0] |
| 39 | if source.endswith('.cpp') and not source.startswith('$') and source not in ignore_list: |
| 40 | source_filename = source.replace('/', '\\') |
| 41 | object_filename = source.replace('/', '_')[:-4] + ".obj" |
| 42 | lib_sources[current_lib].append((source_filename, object_filename)) |
| 43 | if not line.endswith('\\'): |
| 44 | current_lib = '' |
| 45 | continue |
| 46 | for lib in libs: |
| 47 | _lib = lib.replace('-', '_') |
| 48 | if re.search(_lib + '.*_SOURCES \\= \\\\', line): |
| 49 | current_lib = lib |
| 50 | lib_sources[current_lib] = [] |
| 51 | break |
| 52 | |
| 53 | def set_common_properties(toolset): |
| 54 | with open(os.path.join(SOURCE_DIR, '../build_msvc/common.init.vcxproj'), 'r', encoding='utf-8') as rfile: |