INNER CODE UNIT · Python
objectify
racenis/tram-sdk · devtools/maketool.py:244
def objectify(unit):
unit = unit.replace('./', '')
unit = unit.replace('/', '_')
return unit[:-4]
# Generate translation unit rules
for unit in units:
makefile += objectify(unit) + ".o: " + unit + "\n"
makefile += "\t" + compiler + " -c -g -O0 -Wno-narrowing -std=c++20 -I./src"
makefile += " -I" + tramsdk + "libraries"
makefile += " -I" + tramsdk + "src"
if platform == "WEB":
makefile += " -Wno-undefined-var-template"
for module in modules.values():
if module.is_enabled():
makefile += module.compile_includes[platform]
makefile += " " + unit + " -o " + objectify(unit) + ".o\n\n"