|
|
@ -1,26 +1,35 @@
|
|
|
|
|
|
|
|
# the set keyword sets a property of the current scope
|
|
|
|
|
|
|
|
# (i.e. the entire build script, a module, etc.)
|
|
|
|
set RUSTC_EXE = "rustc";
|
|
|
|
set RUSTC_EXE = "rustc";
|
|
|
|
set ASM_EXE = "clang";
|
|
|
|
set ASM_EXE = "clang";
|
|
|
|
set CC_EXE = "clang";
|
|
|
|
set CC_EXE = "clang";
|
|
|
|
set LINK_EXE = "ld.lld";
|
|
|
|
set LINK_EXE = "ld.lld";
|
|
|
|
set BUILD_PREFIX = "build";
|
|
|
|
set BUILD_PREFIX = "build";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# a module is a single compile target.
|
|
|
|
|
|
|
|
# modules can depend on other modules.
|
|
|
|
module kern {
|
|
|
|
module kern {
|
|
|
|
|
|
|
|
# the type keyword defines whether the module is supposed to be
|
|
|
|
|
|
|
|
# compiled into an executable binary (exe) or a library (lib).
|
|
|
|
type exe;
|
|
|
|
type exe;
|
|
|
|
|
|
|
|
# the depend keyword adds one or more dependencies to the module.
|
|
|
|
depend [
|
|
|
|
depend [
|
|
|
|
libk,
|
|
|
|
libk,
|
|
|
|
arch,
|
|
|
|
arch,
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
# the source keyword adds one or more source files to the module.
|
|
|
|
|
|
|
|
# the file extension determines what language/compiler to use.
|
|
|
|
source "kern/lib.rs";
|
|
|
|
source "kern/lib.rs";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
module libk {
|
|
|
|
module libk {
|
|
|
|
type static; # static library
|
|
|
|
type lib;
|
|
|
|
depend arch;
|
|
|
|
depend arch;
|
|
|
|
source "libk/lib.rs";
|
|
|
|
source "libk/lib.rs";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
module arch {
|
|
|
|
module arch {
|
|
|
|
type static;
|
|
|
|
type lib;
|
|
|
|
source [
|
|
|
|
source [
|
|
|
|
"arch/lib.rs",
|
|
|
|
"arch/lib.rs",
|
|
|
|
"arch/**.nasm",
|
|
|
|
"arch/**.nasm",
|
|
|
|