summaryrefslogtreecommitdiff
path: root/components/libc/posix/src/SConscript
diff options
context:
space:
mode:
authorJianting (Meco) Man <[email protected]>2021-11-11 10:55:44 -0500
committerGitHub <[email protected]>2021-11-11 10:55:44 -0500
commitb98539e3f8e437b22014043d9a2adc0ced949c9b (patch)
treeb67a5449c2a74cbaf8cdcd36304c9b97b10335f9 /components/libc/posix/src/SConscript
parentda0bb7f6295450e30fc5608a0ecc89cc8bf572b8 (diff)
parent31f0a9c2acbb32fab06285ff866077c816790124 (diff)
Merge branch 'master' into weak
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)