summaryrefslogtreecommitdiffstats
path: root/src/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/build-scripts/SConscript
blob: d2bee95818c965eaee123c07f8687815ff76f346 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#
# Copyright (c) 2021, RT-Thread Development Team
#
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#

import os
from building import *

cwd  = GetCurrentDir()
objs = []

WAMR_ROOT_DIR = os.path.join(cwd, "..")
SHARED_DIR    = os.path.join(WAMR_ROOT_DIR, 'core', 'shared')
IWASM_DIR     = os.path.join(WAMR_ROOT_DIR, 'core', 'iwasm')
APP_MGR_DIR   = os.path.join(WAMR_ROOT_DIR, 'core', 'app-mgr')
APP_FRAMEWORK_DIR = os.path.join(WAMR_ROOT_DIR, 'core', 'app-framework')
DEPS_DIR      = os.path.join(WAMR_ROOT_DIR, 'core', 'deps')

if GetDepend(['WAMR_BUILD_INTERP']):
    script_path = os.path.join(IWASM_DIR, 'interpreter', 'SConscript')
    objs += SConscript(script_path)

if GetDepend(['WAMR_BUILD_AOT']):
    script_path = os.path.join(IWASM_DIR, 'aot', 'SConscript')
    objs += SConscript(script_path)
    if GetDepend(['WAMR_BUILD_JIT']):
        script_path = os.path.join(IWASM_DIR, 'compilation', 'SConscript')
        objs += SConscript(script_path)

if GetDepend(['WAMR_BUILD_APP_FRAMEWORK']):
    objs += SConscript(os.path.join(APP_FRAMEWORK_DIR, 'SConscript'))
    objs += SConscript(os.path.join(SHARED_DIR, 'coap', 'SConscript'))
    objs += SConscript(os.path.join(APP_MGR_DIR, 'app-manager', 'SConscript'))
    objs += SConscript(os.path.join(APP_MGR_DIR, 'app-mgr-shared', 'SConscript'))

if GetDepend(['WAMR_BUILD_LIBC_BUILTIN']):
    objs += SConscript(os.path.join(IWASM_DIR, 'libraries', 'libc-builtin', 'SConscript'))

if GetDepend(['WAMR_BUILD_LIBC_WASI']):
    objs += SConscript(os.path.join(IWASM_DIR, 'libraries', 'libc-wasi', 'SConscript'))

if GetDepend(['WAMR_BUILD_LIB_PTHREAD']):
    objs += SConscript(os.path.join(IWASM_DIR, 'libraries', 'libc-pthread', 'SConscript'))

if GetDepend(['WAMR_BUILD_THREAD_MGR']):
    objs += SConscript(os.path.join(IWASM_DIR, 'libraries', 'thread-mgr', 'SConscript'))

if GetDepend(['WAMR_BUILD_LIBC_EMCC']):
    objs += SConscript(os.path.join(IWASM_DIR, 'libraries', 'libc-emmc', 'SConscript'))

objs += SConscript(os.path.join(cwd, 'SConscript_config'));

objs += SConscript(os.path.join(SHARED_DIR, 'platform', 'rt-thread', 'SConscript'))
objs += SConscript(os.path.join(SHARED_DIR, 'mem-alloc', 'SConscript'))
objs += SConscript(os.path.join(IWASM_DIR, 'common', 'SConscript'))
objs += SConscript(os.path.join(SHARED_DIR, 'utils', 'SConscript'))

Return('objs')