diff options
Diffstat (limited to 'components/lwp/vdso/SConscript')
| -rw-r--r-- | components/lwp/vdso/SConscript | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/components/lwp/vdso/SConscript b/components/lwp/vdso/SConscript new file mode 100644 index 0000000000..addcdfc840 --- /dev/null +++ b/components/lwp/vdso/SConscript @@ -0,0 +1,48 @@ +import os +import rtconfig +import subprocess +from building import * +Import('RTT_ROOT') + +group = [] + +cwd = GetCurrentDir() +CPPPATH = [cwd, cwd + "/kernel"] + +if not GetDepend(['RT_USING_VDSO']): + Return('group') + +if rtconfig.ARCH != "aarch64": + src = Glob('*.c') + group = DefineGroup('VDSO', src, depend = ['RT_USING_SMART','RT_USING_VDSO'], CPPPATH = CPPPATH) + Return('group') + +list = os.listdir(cwd) +src = Glob('kernel/*.c') +src +=Glob('kernel/*.S') + +if not os.path.exists(cwd + "/user/vdso.lds"): + Preprocessing("user/vdso.lds.S", ".lds", CPPPATH=[cwd]) + +#aarch64 vdso xmake +# vdso_file = os.path.join(cwd, 'usr', 'xmake.lua') +# command = ["xmake", "-F", vdso_file] +# clean = ["xmake", "clean"] + +vdso_file = os.path.join(cwd, 'user', 'SConstruct') +command = ["scons", "-f", vdso_file] +clean = ["scons", "-f", vdso_file, "--clean"] + +if not GetOption('clean'): + result = subprocess.run(command) +else: + result = subprocess.run(clean) + +if result.returncode == 0: + print("Command executed successfully") +else: + print("Command failed with exit code:", result.returncode) + exit(1) + +group = DefineGroup('VDSO', src, depend = ['RT_USING_SMART','RT_USING_VDSO'], CPPPATH = CPPPATH) +Return('group') |
