This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on PSP.cmake by @take-cheeze (https://gist.github.com/take-cheeze/1078147) | |
set(CMAKE_SYSTEM_NAME Generic) | |
set(PSP TRUE) | |
add_definitions(-D__PSP__) | |
# Prevent "relocation truncated to fit" errors | |
set(CMAKE_C_FLAGS -G0) | |
set(CMAKE_CXX_FLAGS -G0) | |
set(CMAKE_EXE_LINKER_FLAGS -G0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import os | |
import re | |
import sys | |
SCRIPT_REGEX = re.compile('if \(.+?"(.+?)".+?\).+?lines\[\] = {\n(.+?)}', re.MULTILINE | re.DOTALL) | |
LINE_CONTENT_REGEX = re.compile('^\s{8}(\S)', re.MULTILINE) | |
if len(sys.argv) < 3: | |
print(f'Usage: {sys.argv[0]} <input c++ file> <output directory>') |