forked from eclipse-zenoh/zenoh-pico
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextra_script.py
32 lines (26 loc) · 822 Bytes
/
extra_script.py
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
Import('env')
from os.path import join, realpath
src_filter = []
cppdefines = []
framework = env.get("PIOFRAMEWORK")[0]
if framework == 'zephyr':
src_filter=["+<*>",
"-<tests/>",
"-<example/>",
"-<system/unix/>",
"-<system/esp32/>"]
cppdefines=["ZENOH_ZEPHYR"]
elif framework == 'arduino':
platform = env.get("PIOPLATFORM")
if platform == 'espressif32':
src_filter=["+<*>",
"-<tests/>",
"-<example/>",
"-<system/unix/>",
"-<system/zephyr/>"]
cppdefines=["ZENOH_ESP32"]
env.Append(SRC_FILTER=src_filter)
env.Append(CPPDEFINES=cppdefines)
# pass flags to a global build environment (for all libraries, etc)
global_env = DefaultEnvironment()
global_env.Append(CPPDEFINES=cppdefines)