summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rwxr-xr-xmeta/build.sh1
-rwxr-xr-xmeta/kernel.sh1
-rwxr-xr-xmeta/toolchain.sh13
-rwxr-xr-xmeta/userland.sh3
4 files changed, 18 insertions, 0 deletions
diff --git a/meta/build.sh b/meta/build.sh
index 39d778a..66b093b 100755
--- a/meta/build.sh
+++ b/meta/build.sh
@@ -1,4 +1,5 @@
#!/bin/sh
scriptdir="$(dirname "$0")"
cd "$scriptdir"
+export PATH="$PATH:$(pwd)/../toolchain/bin/bin"
./kernel.sh && ./userland.sh && ./sync.sh
diff --git a/meta/kernel.sh b/meta/kernel.sh
index 4cd02b8..dd74999 100755
--- a/meta/kernel.sh
+++ b/meta/kernel.sh
@@ -1,4 +1,5 @@
#!/bin/sh
scriptdir="$(dirname "$0")"
cd "$scriptdir"
+export PATH="$PATH:$(pwd)/../toolchain/bin/bin"
make -C ../kernel
diff --git a/meta/toolchain.sh b/meta/toolchain.sh
new file mode 100755
index 0000000..c50008f
--- /dev/null
+++ b/meta/toolchain.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+# This script compiles the operating system toolchain(GCC, Binutils)
+scriptdir="$(dirname "$0")"
+cd "$scriptdir"
+cd ..
+
+# Install the headers from LibC
+mkdir -p ./sysroot/usr/include/
+cp -r ./userland/libc/include ./sysroot/usr/
+
+cd ./toolchain/
+./build-binutils.sh
+./build-gcc.sh
diff --git a/meta/userland.sh b/meta/userland.sh
index 1686023..94ab441 100755
--- a/meta/userland.sh
+++ b/meta/userland.sh
@@ -1,9 +1,12 @@
#!/bin/sh
scriptdir="$(dirname "$0")"
cd "$scriptdir"
+export PATH="$PATH:$(pwd)/../toolchain/bin/bin"
cd ..
make -C ./userland/libgui
make -C ./userland/libc
+mkdir -p ./sysroot/lib
+make install -C ./userland/libc
make -C ./userland/sh
make -C ./userland/terminal
make -C ./userland/snake