Tweak
This commit is contained in:
@ -27,7 +27,7 @@ Importation('gen/esp32_boot.h', '$src/esp32/esp32_boot.fs', name='boot')
|
|||||||
|
|
||||||
# Optional Compontents.
|
# Optional Compontents.
|
||||||
Mkdir('esp32/ESP32forth/optional')
|
Mkdir('esp32/ESP32forth/optional')
|
||||||
ESP32_FILES = [
|
ESP32_FILES += [
|
||||||
Importation('esp32/ESP32forth/optional/README-optional.txt',
|
Importation('esp32/ESP32forth/optional/README-optional.txt',
|
||||||
'$src/esp32/optional/README-optional.txt'),
|
'$src/esp32/optional/README-optional.txt'),
|
||||||
Esp32Optional('rmt', '$src/esp32/optional/rmt.h', []),
|
Esp32Optional('rmt', '$src/esp32/optional/rmt.h', []),
|
||||||
|
|||||||
@ -30,7 +30,7 @@ REVISION = 'TODO'
|
|||||||
|
|
||||||
CFLAGS_COMMON = [
|
CFLAGS_COMMON = [
|
||||||
'-O2',
|
'-O2',
|
||||||
'-I', '$src',
|
'-I', '$src/',
|
||||||
'-I', './',
|
'-I', './',
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -127,7 +127,8 @@ D8 = LSQ('${HOME}/src/v8/v8/out/x64.release/d8')
|
|||||||
NODEJS = LSQ('/usr/bin/nodejs')
|
NODEJS = LSQ('/usr/bin/nodejs')
|
||||||
|
|
||||||
output = f"""
|
output = f"""
|
||||||
src = ../
|
ninja_required_version = 1.1
|
||||||
|
src = ..
|
||||||
VERSION = {VERSION}
|
VERSION = {VERSION}
|
||||||
REVISION = {REVISION}
|
REVISION = {REVISION}
|
||||||
CFLAGS = {' '.join(CFLAGS)}
|
CFLAGS = {' '.join(CFLAGS)}
|
||||||
@ -155,23 +156,25 @@ rule mkdir
|
|||||||
|
|
||||||
rule importation
|
rule importation
|
||||||
description = importation
|
description = importation
|
||||||
depfile = $out.dd
|
depfile = $out.d
|
||||||
|
deps = gcc
|
||||||
command = $src/tools/importation.py -i $in -o $out -I . -I $src $options --depsout $depfile -DVERSION=$VERSION -DREVISION=$REVERSION
|
command = $src/tools/importation.py -i $in -o $out -I . -I $src $options --depsout $depfile -DVERSION=$VERSION -DREVISION=$REVERSION
|
||||||
|
|
||||||
rule compile
|
rule compile
|
||||||
description = CXX
|
description = CXX
|
||||||
depfile = $out.dd
|
depfile = $out.d
|
||||||
|
deps = gcc
|
||||||
command = $CXX $CFLAGS $in -o $out $LIBS -MD -MF $depfile && strip $STRIP_ARGS $out
|
command = $CXX $CFLAGS $in -o $out $LIBS -MD -MF $depfile && strip $STRIP_ARGS $out
|
||||||
|
|
||||||
rule compile_win32
|
rule compile_win32
|
||||||
description = WIN_CL32
|
description = WIN_CL32
|
||||||
depfile = $out.dd
|
deps = msvc
|
||||||
command = $src/tools/importation.py -i $in -o $out --no-out -I . -I $src --depsout $out.dd && $WIN_CL32 /nologo /c /Fo$out $WIN_CFLAGS $in >/dev/null
|
command = $WIN_CL32 /showIncludes /nologo /c /Fo$out $WIN_CFLAGS $in
|
||||||
|
|
||||||
rule compile_win64
|
rule compile_win64
|
||||||
description = WIN_CL64
|
description = WIN_CL64
|
||||||
depfile = $out.dd
|
deps = msvc
|
||||||
command = $src/tools/importation.py -i $in -o $out --no-out -I . -I $src --depsout $out.dd && $WIN_CL64 /nologo /c /Fo$out $WIN_CFLAGS $in >/dev/null
|
command = $WIN_CL64 /showIncludes /nologo /c /Fo$out $WIN_CFLAGS $in >/dev/null
|
||||||
|
|
||||||
rule link_win32
|
rule link_win32
|
||||||
description = WIN_LINK32
|
description = WIN_LINK32
|
||||||
@ -237,7 +240,7 @@ def Esp32Optional(main_name, main_source, parts):
|
|||||||
return Importation('esp32/ESP32forth/optional/' + main_name + '.h',
|
return Importation('esp32/ESP32forth/optional/' + main_name + '.h',
|
||||||
main_source,
|
main_source,
|
||||||
keep=True,
|
keep=True,
|
||||||
deps='gen/esp32_optional_' + main_name + '.h.dd',
|
deps='gen/esp32_optional_' + main_name + '.h.d',
|
||||||
implicit=['gen/esp32_' + i + '.h' for i, _ in parts])
|
implicit=['gen/esp32_' + i + '.h' for i, _ in parts])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -99,7 +99,7 @@ def Process():
|
|||||||
if args.depsout:
|
if args.depsout:
|
||||||
with open(args.depsout, 'w') as fh:
|
with open(args.depsout, 'w') as fh:
|
||||||
fh.write(args.o + ': ' +
|
fh.write(args.o + ': ' +
|
||||||
' '.join([os.path.relpath(i) for i in imported]) + '\n')
|
' '.join([os.path.relpath(i) for i in sorted(imported)]) + '\n')
|
||||||
# Emit expanded file.
|
# Emit expanded file.
|
||||||
if not args.no_out:
|
if not args.no_out:
|
||||||
with open(args.o, 'w') as fh:
|
with open(args.o, 'w') as fh:
|
||||||
|
|||||||
Reference in New Issue
Block a user