Add fast mode.
This commit is contained in:
14
configure.py
14
configure.py
@ -26,6 +26,8 @@ SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
|||||||
ROOT_DIR = SCRIPT_DIR
|
ROOT_DIR = SCRIPT_DIR
|
||||||
NINJA_BUILD = os.path.join(ROOT_DIR, 'build.ninja')
|
NINJA_BUILD = os.path.join(ROOT_DIR, 'build.ninja')
|
||||||
|
|
||||||
|
FAST = False
|
||||||
|
|
||||||
SRC_DIR = os.path.relpath(ROOT_DIR, os.getcwd())
|
SRC_DIR = os.path.relpath(ROOT_DIR, os.getcwd())
|
||||||
if SRC_DIR == '.':
|
if SRC_DIR == '.':
|
||||||
DST_DIR = 'out'
|
DST_DIR = 'out'
|
||||||
@ -189,6 +191,13 @@ def DetectGenericTools(args):
|
|||||||
sys.stderr.write('Missing package gcc-arm-none-eabi, pico-ice diabled!\n')
|
sys.stderr.write('Missing package gcc-arm-none-eabi, pico-ice diabled!\n')
|
||||||
|
|
||||||
|
|
||||||
|
def FastOption():
|
||||||
|
if FAST:
|
||||||
|
return '-f'
|
||||||
|
else:
|
||||||
|
return ''
|
||||||
|
|
||||||
|
|
||||||
def InitOutput():
|
def InitOutput():
|
||||||
global output
|
global output
|
||||||
output = f"""
|
output = f"""
|
||||||
@ -221,7 +230,7 @@ WIN_LFLAGS64 = {' '.join(WIN_LFLAGS64)}
|
|||||||
|
|
||||||
rule config
|
rule config
|
||||||
description = CONFIG
|
description = CONFIG
|
||||||
command = $src/configure.py -q
|
command = $src/configure.py -q {FastOption()}
|
||||||
|
|
||||||
rule revstamp
|
rule revstamp
|
||||||
description = REVSTAMP
|
description = REVSTAMP
|
||||||
@ -530,7 +539,10 @@ def Main():
|
|||||||
prog='configure',
|
prog='configure',
|
||||||
description='Generate ninja.build')
|
description='Generate ninja.build')
|
||||||
parser.add_argument('-q', '--quiet', action='store_true')
|
parser.add_argument('-q', '--quiet', action='store_true')
|
||||||
|
parser.add_argument('-f', '--fast', action='store_true')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
global FAST
|
||||||
|
FAST = args.fast
|
||||||
DetectGenericTools(args)
|
DetectGenericTools(args)
|
||||||
DetectWindowsTools(args)
|
DetectWindowsTools(args)
|
||||||
InitOutput()
|
InitOutput()
|
||||||
|
|||||||
@ -74,4 +74,5 @@ Importation('$dst/gen/pico_ice_boot.h', '$src/pico-ice/pico_ice_boot.fs', name='
|
|||||||
|
|
||||||
# Main Alias.
|
# Main Alias.
|
||||||
Alias('pico', ' '.join(PICO_ICE_FILES))
|
Alias('pico', ' '.join(PICO_ICE_FILES))
|
||||||
Default('pico')
|
if not FAST:
|
||||||
|
Default('pico')
|
||||||
|
|||||||
@ -16,7 +16,8 @@ if not WINDOWS_ENABLED:
|
|||||||
Return()
|
Return()
|
||||||
|
|
||||||
Alias('windows', 'win32 win64')
|
Alias('windows', 'win32 win64')
|
||||||
Default('windows')
|
if not FAST:
|
||||||
|
Default('windows')
|
||||||
|
|
||||||
# Create boot.
|
# Create boot.
|
||||||
Importation('$dst/gen/windows_boot.h', '$src/windows/windows_boot.fs',
|
Importation('$dst/gen/windows_boot.h', '$src/windows/windows_boot.fs',
|
||||||
|
|||||||
Reference in New Issue
Block a user