misc: Makefile adjustments
diff --git a/Makefile b/Makefile
index 59c862c4..a48f47d4 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ DESTDIR =
PATH := $(shell pwd)/toolchain/bin:$(PATH)
-.PHONY: all clean install bootloader bootloader-clean distclean stage2 stage2-clean decompressor decompressor-clean toolchain test.hdd echfs-test ext2-test fat32-test
+.PHONY: all clean install tinf-clean bootloader bootloader-clean distclean stage2 stage2-clean decompressor decompressor-clean toolchain test.hdd echfs-test ext2-test fat32-test
all: limine-install
@@ -26,7 +26,7 @@ install: all
install -d $(DESTDIR)$(PREFIX)/bin
install -s limine-install $(DESTDIR)$(PREFIX)/bin/
-bootloader: | decompressor decompressor-clean stage2
+bootloader: | decompressor stage2
gzip -n -9 < stage2/stage2.bin > stage2/stage2.bin.gz
cd bootsect && nasm bootsect.asm -fbin -o ../limine.bin
cd pxeboot && nasm bootsect.asm -fbin -o ../limine-pxe.bin
@@ -39,17 +39,20 @@ bootloader-clean: stage2-clean decompressor-clean test-clean
distclean: clean bootloader-clean
rm -rf stivale
+tinf-clean:
+ cd tinf && rm -rf *.o *.d
+
stivale:
git clone https://github.com/stivale/stivale.git
cd stivale && git checkout d0a7ca5642d89654f8d688c2481c2771a8653c99
-stage2: stivale
+stage2: tinf-clean stivale
$(MAKE) -C stage2 all
stage2-clean:
$(MAKE) -C stage2 clean
-decompressor:
+decompressor: tinf-clean
$(MAKE) -C decompressor all
decompressor-clean:
diff --git a/decompressor/Makefile b/decompressor/Makefile
index 6646f811..2fe9a9e1 100644
--- a/decompressor/Makefile
+++ b/decompressor/Makefile
@@ -34,8 +34,8 @@ INTERNAL_LDFLAGS = \
.PHONY: all clean
-C_FILES := $(shell find ./ -type f -name '*.c' | sort)
-ASM_FILES := $(shell find ./ -type f -name '*.asm' | sort)
+C_FILES := $(shell find -L ./ -type f -name '*.c' | sort)
+ASM_FILES := $(shell find -L ./ -type f -name '*.asm' | sort)
OBJ := $(ASM_FILES:.asm=.o) $(C_FILES:.c=.o)
HEADER_DEPS := $(C_FILES:.c=.d)
diff --git a/decompressor/main.c b/decompressor/main.c
index 6ef54587..28da81dc 100644
--- a/decompressor/main.c
+++ b/decompressor/main.c
@@ -1,6 +1,6 @@
#include <stdint.h>
#include <stddef.h>
-#include <gzip/tinf.h>
+#include <tinf/tinf.h>
__attribute__((noreturn))
void entry(uint8_t *compressed_stage2, size_t stage2_size, uint8_t boot_drive, int pxe) {
diff --git a/decompressor/tinf b/decompressor/tinf
new file mode 120000
index 00000000..fded5ef1
--- /dev/null
+++ b/decompressor/tinf
@@ -0,0 +1 @@
+../tinf/
\ No newline at end of file
diff --git a/stage2/tinf b/stage2/tinf
index 6939ed65..fded5ef1 120000
--- a/stage2/tinf
+++ b/stage2/tinf
@@ -1 +1 @@
-../decompressor/gzip/
\ No newline at end of file
+../tinf/
\ No newline at end of file
diff --git a/decompressor/gzip/tinf.h b/tinf/tinf.h
similarity index 100%
rename from decompressor/gzip/tinf.h
rename to tinf/tinf.h
diff --git a/decompressor/gzip/tinfgzip.c b/tinf/tinfgzip.c
similarity index 100%
rename from decompressor/gzip/tinfgzip.c
rename to tinf/tinfgzip.c
diff --git a/decompressor/gzip/tinflate.c b/tinf/tinflate.c
similarity index 100%
rename from decompressor/gzip/tinflate.c
rename to tinf/tinflate.c
