2014-07-28 00:09:31 +00:00
|
|
|
import sys
|
|
|
|
|
|
|
|
Import('env')
|
|
|
|
|
|
|
|
libc_env = env.Clone()
|
|
|
|
|
|
|
|
src = [ ]
|
|
|
|
|
|
|
|
src_common = [
|
2015-01-05 06:10:37 +00:00
|
|
|
"abort.c",
|
2014-10-14 19:39:26 +00:00
|
|
|
"assert.c",
|
2015-01-03 00:13:53 +00:00
|
|
|
"dir.c",
|
2014-08-08 00:58:41 +00:00
|
|
|
"exit.c",
|
2014-10-15 01:00:14 +00:00
|
|
|
"file.c",
|
2015-01-05 06:10:37 +00:00
|
|
|
"malloc.c",
|
2015-01-16 22:51:03 +00:00
|
|
|
"printf.c",
|
|
|
|
"process.c",
|
|
|
|
"posix/mman.c",
|
2015-01-17 04:15:47 +00:00
|
|
|
"posix/pthread.c",
|
2014-10-15 02:07:19 +00:00
|
|
|
"string.c",
|
2014-08-08 00:58:41 +00:00
|
|
|
"syscall.c",
|
2014-12-31 01:54:42 +00:00
|
|
|
"time.c",
|
2014-07-28 00:09:31 +00:00
|
|
|
]
|
|
|
|
|
2014-08-08 00:58:41 +00:00
|
|
|
src_amd64 = [
|
2014-09-05 01:22:04 +00:00
|
|
|
"amd64/entry.S",
|
|
|
|
"amd64/syscall.S",
|
2014-08-08 00:58:41 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
if (env["ARCH"] == "amd64"):
|
|
|
|
src.append(src_amd64)
|
2014-07-28 00:09:31 +00:00
|
|
|
src.append(src_common)
|
|
|
|
|
|
|
|
libc_env.Append(CPPFLAGS = ['-nostdinc'])
|
|
|
|
libc_env.Append(CPPPATH = ['#build/include'])
|
|
|
|
|
|
|
|
libc_env.StaticLibrary("libc", src)
|
|
|
|
|