1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 22:38:08 +00:00

firmware: reuse SOURCE_PY_DIR where possible

This commit is contained in:
Pavol Rusnak 2018-09-20 14:47:05 +02:00
parent 398f1557d6
commit c58c4a94d8
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 7 additions and 6 deletions

View File

@ -276,12 +276,12 @@ SOURCE_TREZORHAL = [
SOURCE_QSTR = SOURCE_MOD + SOURCE_MICROPYTHON + SOURCE_MICROPYTHON_SPEED SOURCE_QSTR = SOURCE_MOD + SOURCE_MICROPYTHON + SOURCE_MICROPYTHON_SPEED
# TODO: recursive Glob # TODO: recursive Glob
SOURCE_PY = Glob('src/*.py')
SOURCE_PY.extend(Glob('src/*/*.py'))
SOURCE_PY.extend(Glob('src/*/*/*.py'))
SOURCE_PY.extend(Glob('src/*/*/*/*.py'))
SOURCE_PY.extend(Glob('src/*/*/*/*/*.py'))
SOURCE_PY_DIR = 'src/' SOURCE_PY_DIR = 'src/'
SOURCE_PY = Glob(SOURCE_PY_DIR + '*.py')
SOURCE_PY.extend(Glob(SOURCE_PY_DIR+'*/*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR+'*/*/*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR+'*/*/*/*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR+'*/*/*/*/*.py'))
env = Environment(ENV=os.environ, CFLAGS='%s -DPRODUCTION=%s -DPYOPT=%s' % (ARGUMENTS.get('CFLAGS', ''), ARGUMENTS.get('PRODUCTION', '0'), PYOPT)) env = Environment(ENV=os.environ, CFLAGS='%s -DPRODUCTION=%s -DPYOPT=%s' % (ARGUMENTS.get('CFLAGS', ''), ARGUMENTS.get('PRODUCTION', '0'), PYOPT))

3
emu.sh
View File

@ -7,10 +7,11 @@ PYOPT="${PYOPT:-1}"
MAIN="${MAIN:-main.py}" MAIN="${MAIN:-main.py}"
BROWSER="${BROWSER:-chromium}" BROWSER="${BROWSER:-chromium}"
HEAPSIZE="${HEAPSIZE:-800K}" HEAPSIZE="${HEAPSIZE:-800K}"
SOURCE_PY_DIR="${SOURCE_PY_DIR:-src}"
ARGS="-O${PYOPT} -X heapsize=${HEAPSIZE}" ARGS="-O${PYOPT} -X heapsize=${HEAPSIZE}"
cd `dirname $0`/src cd `dirname $0`/$SOURCE_PY_DIR
case "$1" in case "$1" in
"-d") "-d")