diff options
author | Ian Moffett <ian@osmora.org> | 2024-03-07 17:28:52 -0500 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-03-07 18:24:51 -0500 |
commit | f5e48e94a2f4d4bbd6e5628c7f2afafc6dbcc459 (patch) | |
tree | 93b156621dc0303816b37f60ba88051b702d92f6 /Makefile.in | |
parent | bd5969fc876a10b18613302db7087ef3c40f18e1 (diff) |
build: Build mlibc + add distclean target
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in index 8b098c6..f61c4e9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -69,10 +69,19 @@ override KERNEL_ASMOBJECTS = $(KERNEL_ASMFILES:.S=.S.o) override KERNEL_HEADER_DEPS = $(KERNEL_CFILES:.c=.d) .PHONY: all -all: base/boot/hyra-kernel +all: base lib base/usr/lib/ld.so base/boot/hyra-kernel rm -f sys/include/machine rm -rf iso_root +base: + mkdir -p base/usr/lib/ + +lib: lib/mlibc base/usr/lib/ld.so + +lib/mlibc: + git clone https://github.com/sigsegv7/hyra-mlibc lib/mlibc + cp builddeps/cross_file.txt lib/mlibc/ + .PHONY: run run: $(QEMU) $(QEMU_FLAGS) @@ -82,6 +91,14 @@ cross: bash tools/cross.sh $(ARCH) .PHONY: clean +distclean: + make clean + rm -f $(KERNEL_ASMOBJECTS) $(KERNEL_OBJECTS) $(KERNEL_HEADER_DEPS) + rm -f sys/include/machine + rm -f base/usr/lib/ld.so + cd lib/; make clean + +.PHONY: clean clean: rm -f $(KERNEL_ASMOBJECTS) $(KERNEL_OBJECTS) $(KERNEL_HEADER_DEPS) rm -f sys/include/machine @@ -89,6 +106,13 @@ clean: sys/include/machine/: cd sys/include/; ln -sf arch/$(ARCH) machine +base/usr/lib/ld.so: lib/mlibc/ + cd lib/; make mlibc/build/ + $(PROMPT) " DYNLD " base/usr/lib/ld.so + $(PROMPT) " LIBC " base/usr/lib/libc.so + cp lib/mlibc/build/ld.so base/usr/lib/ + cp lib/mlibc/build/libc.so base/usr/lib/ + base/boot/hyra-kernel: $(KERNEL_OBJECTS) $(KERNEL_ASMOBJECTS) rm -rf iso_root mkdir -p base/boot/ |