39 lines
557 B
Python
39 lines
557 B
Python
import sys
|
|
|
|
Import('env')
|
|
|
|
libc_env = env.Clone()
|
|
|
|
src = [ ]
|
|
|
|
src_common = [
|
|
"abort.c",
|
|
"assert.c",
|
|
"dir.c",
|
|
"exit.c",
|
|
"file.c",
|
|
"malloc.c",
|
|
"printf.c",
|
|
"process.c",
|
|
"posix/mman.c",
|
|
"posix/pthread.c",
|
|
"string.c",
|
|
"syscall.c",
|
|
"time.c",
|
|
]
|
|
|
|
src_amd64 = [
|
|
"amd64/entry.S",
|
|
"amd64/syscall.S",
|
|
]
|
|
|
|
if (env["ARCH"] == "amd64"):
|
|
src.append(src_amd64)
|
|
src.append(src_common)
|
|
|
|
libc_env.Append(CPPFLAGS = ['-nostdinc'])
|
|
libc_env.Append(CPPPATH = ['#build/include'])
|
|
|
|
libc_env.StaticLibrary("libc", src)
|
|
|