summaryrefslogtreecommitdiff
path: root/components/libc/posix/src/SConscript
diff options
context:
space:
mode:
authorWayne <[email protected]>2021-11-15 11:28:34 +0800
committerGitHub <[email protected]>2021-11-15 11:28:34 +0800
commit17cbdda13da4b4ca7643ad729b2ba1b138009fd3 (patch)
tree685fc3f6ce9d42aff6230f534745152519e76ff5 /components/libc/posix/src/SConscript
parentc07b2b0a07a25b6bdecaacef9ad229fbd5f3fd37 (diff)
parent5711b0a76b8d80ab2dc4cdbf925a7b48f4140a5d (diff)
Merge branch 'RT-Thread:master' into nuvoton
Diffstat (limited to 'components/libc/posix/src/SConscript')
-rw-r--r--components/libc/posix/src/SConscript21
1 files changed, 17 insertions, 4 deletions
diff --git a/components/libc/posix/src/SConscript b/components/libc/posix/src/SConscript
index f338b52cec..78a2a933ed 100644
--- a/components/libc/posix/src/SConscript
+++ b/components/libc/posix/src/SConscript
@@ -1,12 +1,25 @@
+# RT-Thread building script for component
+
from building import *
-Import('rtconfig')
-src = Glob('*.c')
+src = ['unistd.c']
cwd = GetCurrentDir()
CPPPATH = [cwd]
-if rtconfig.ARCH == 'sim': # the vs simulator does not support select and poll
- SrcRemove(src, ['select.c', 'poll.c'])
+if GetDepend('RT_USING_POSIX_STDIO'):
+ src += ['libc.c']
+
+if GetDepend('RT_USING_POSIX_DELAY'):
+ src += ['delay.c']
+
+if GetDepend('RT_USING_POSIX_POLL'):
+ src += ['poll.c']
+
+if GetDepend('RT_USING_POSIX_SELECT'):
+ src += ['select.c']
+
+if GetDepend('RT_USING_POSIX_MMAP'):
+ src += ['mmap.c']
group = DefineGroup('POSIX', src, depend = ['RT_USING_POSIX'], CPPPATH = CPPPATH)