1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 14:28:07 +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
# 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 = 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))

3
emu.sh
View File

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