32 lines
443 B
Python
32 lines
443 B
Python
import sys
|
|
|
|
Import('env')
|
|
|
|
libc_env = env.Clone()
|
|
|
|
src = [ ]
|
|
|
|
src_common = [
|
|
"assert.c",
|
|
"exit.c",
|
|
"file.c",
|
|
"string.c",
|
|
"syscall.c",
|
|
"posix/mman.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)
|
|
|