gdbstub_plugin/build.py
Yannik Marchand bbf63715e9 Add files
2018-09-24 10:43:20 +02:00

17 lines
520 B
Python

import os
import subprocess
PPC_GCC = r"C:\devkitPro\devkitPPC\bin\powerpc-eabi-g++"
files = []
for dirname, subdirs, subfiles in os.walk("src"):
for filename in subfiles:
if filename.endswith(".cpp") or filename.endswith(".c") or \
filename.endswith(".S") or filename.endswith(".s"):
filepath = os.path.join(dirname, filename)
files.append(filepath)
args = "-O2 -Isrc -fno-exceptions -nostartfiles -T src/link.ld -Wl,-n -Wl,--gc-sections"
subprocess.call("%s %s %s" %(PPC_GCC, args, " ".join(files)))