|
|
@ -2,6 +2,15 @@ import os |
|
|
import sys |
|
|
import sys |
|
|
import rtconfig |
|
|
import rtconfig |
|
|
|
|
|
|
|
|
|
|
|
# 增加参数 --custom EDU_Training |
|
|
|
|
|
AddOption( |
|
|
|
|
|
"--custom", |
|
|
|
|
|
dest="custom", |
|
|
|
|
|
type="string", |
|
|
|
|
|
help="Specify the custom version, Edu_training etc.", |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if os.getenv('RTT_ROOT'): |
|
|
if os.getenv('RTT_ROOT'): |
|
|
RTT_ROOT = os.getenv('RTT_ROOT') |
|
|
RTT_ROOT = os.getenv('RTT_ROOT') |
|
|
else: |
|
|
else: |
|
|
@ -30,6 +39,10 @@ env = Environment(tools = ['mingw'], |
|
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) |
|
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) |
|
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) |
|
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) |
|
|
|
|
|
|
|
|
|
|
|
if GetOption("custom") == "EDU_Training": |
|
|
|
|
|
env.Append(CPPDEFINES=["EDU_TRAINING"]) |
|
|
|
|
|
print("Custom version: " + GetOption("custom")) |
|
|
|
|
|
|
|
|
if rtconfig.PLATFORM in ['iccarm']: |
|
|
if rtconfig.PLATFORM in ['iccarm']: |
|
|
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) |
|
|
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) |
|
|
env.Replace(ARFLAGS = ['']) |
|
|
env.Replace(ARFLAGS = ['']) |
|
|
|