EAL/APP_Framework/Framework/knowing/micropython/SConscript

40 lines
1.1 KiB
Python

import os
from building import *
cwd = GetCurrentDir()
src = []
CPPPATH = []
CPPDEFINES = []
if GetDepend(['USING_MICROPYTHON']):
# Include paths
CPPPATH = [
cwd,
os.path.join(cwd, 'py'),
os.path.join(cwd, 'py_port'),
os.path.join(cwd, 'extmod'),
os.path.join(cwd, 'shared'),
os.path.join(cwd, 'shared', 'readline'),
os.path.join(cwd, 'shared', 'runtime')
]
# Source files from all directories
src += Glob('py/*.c')
src += Glob('py_port/*.c')
# Conditional modules
if GetDepend(['USING_MICROPYTHON_EXTMOD']):
src += Glob('extmod/*.c')
if GetDepend(['USING_MICROPYTHON_SHARED_READLINE']):
src += Glob('shared/readline/*.c')
if GetDepend(['USING_MICROPYTHON_SHARED_RUNTIME']):
src += Glob('shared/runtime/*.c')
# Core definitions
CPPDEFINES = ['MICROPY_ENABLE_GC=1', 'MICROPY_PY_IO=1', 'MICROPY_PY_FSTRINGS=1']
group = DefineGroup('micropython', src, depend = ['USING_MICROPYTHON'], CPPPATH = CPPPATH, LOCAL_CPPDEFINES=CPPDEFINES)
Return('group')