misc: Misc adjustments
diff --git a/.gitignore b/.gitignore
index 8b85629f..67e67357 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,5 @@
-bin
-/**/*.gen
-/**/*.map
+/bin
+/toolchain
/**/*.o
/**/*.d
/**/*.a
@@ -13,6 +12,5 @@ bin
/bochsout.txt
/bx_enh_dbg.ini
.vscode
-/limine-install
/stivale
/test_image
diff --git a/Makefile b/Makefile
index eccd6b39..ff625ba6 100644
--- a/Makefile
+++ b/Makefile
@@ -33,14 +33,13 @@ bootloader: | decompressor stage23
bootloader-clean: stage23-clean decompressor-clean
distclean: clean bootloader-clean test-clean
- rm -rf bin stivale
+ rm -rf bin stivale toolchain
tinf-clean:
cd tinf && rm -rf *.o *.d
stivale:
git clone https://github.com/stivale/stivale.git
- cd stivale && git checkout d0a7ca5642d89654f8d688c2481c2771a8653c99
stage23: tinf-clean stivale
$(MAKE) -C stage23 all
@@ -59,7 +58,7 @@ test-clean:
rm -rf test_image test.hdd test.iso
toolchain:
- cd toolchain && ./make_toolchain.sh -j`nproc`
+ ./make_toolchain.sh ./toolchain -j`nproc`
test.hdd:
rm -f test.hdd
@@ -76,7 +75,6 @@ echfs-test: | test-clean test.hdd bootloader all
echfs-utils -g -p0 test.hdd import test/test.elf boot/test.elf
echfs-utils -g -p0 test.hdd import test/bg.bmp boot/bg.bmp
echfs-utils -g -p0 test.hdd import bin/limine.sys boot/limine.sys
- echfs-utils -g -p0 test.hdd import bin/limine.map boot/limine.map
bin/limine-install test.hdd
qemu-system-x86_64 -net none -smp 4 -enable-kvm -cpu host -hda test.hdd -debugcon stdio
diff --git a/toolchain/make_toolchain.sh b/make_toolchain.sh
similarity index 95%
rename from toolchain/make_toolchain.sh
rename to make_toolchain.sh
index 2dd82e17..5455241c 100755
--- a/toolchain/make_toolchain.sh
+++ b/make_toolchain.sh
@@ -3,17 +3,16 @@
set -e
set -x
-PREFIX="$(pwd)"
TARGET=i386-elf
BINUTILSVERSION=2.36.1
GCCVERSION=10.2.0
NASMVERSION=2.15.05
GZIPVERSION=1.10
-if [ -z "$MAKEFLAGS" ]; then
- MAKEFLAGS="$1"
-fi
-export MAKEFLAGS
+mkdir -p "$1" && cd "$1"
+PREFIX="$(pwd)"
+
+export MAKEFLAGS="$2"
export PATH="$PREFIX/bin:$PATH"
diff --git a/toolchain/.gitignore b/toolchain/.gitignore
deleted file mode 100644
index fd038def..00000000
--- a/toolchain/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-*
-!.gitignore
-!make_toolchain.sh
