diff options
author | Ian Moffett <ian@osmora.org> | 2024-03-17 20:59:31 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-03-17 20:59:31 -0400 |
commit | 0776264c266e7c1619b8b8b84d2da5384979bb3c (patch) | |
tree | 80b6ded012336e24c72cc2c16e4c3ce952b7b739 /Makefile.in | |
parent | 7895aaff402a021a1b04645ca8d251f760e5662e (diff) | |
parent | 2896f4126de2ee0fd1bab4b960bfb2213c359f18 (diff) |
Merge branch 'user' into dev
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in index 8b098c6..f4336a7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -47,6 +47,8 @@ else override LD = $(shell pwd)/cross/bin/$(ARCH)-hyra-ld endif override AS = $(CC) +override LDSO = $(shell pwd)/base/usr/lib/ld.so +override USER_MKFLGS = CC=$(CC) LD=$(LD) LDSO=$(LDSO) ########################## # Architecture specifics @@ -69,10 +71,28 @@ 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 userland base/usr/lib/ld.so base/boot/hyra-kernel rm -f sys/include/machine rm -rf iso_root +base/usr/sbin/init: + cd usr.sbin/; make $(USER_MKFLGS) + mv usr.sbin/init/init base/usr/sbin/ + +# TODO: Make this more flexible +.PHONY: userland +userland: base/usr/sbin/init + +base: + mkdir -p base/usr/lib/ + mkdir -p base/usr/sbin/ + mkdir -p base/boot/ + +.PHONY: lib +lib: + cd lib/; make $(USER_MKFLGS) + cp lib/libc/build/ld.so base/usr/lib/ + .PHONY: run run: $(QEMU) $(QEMU_FLAGS) @@ -82,6 +102,15 @@ 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 + rm -f base/boot/init + cd lib/; make clean + +.PHONY: clean clean: rm -f $(KERNEL_ASMOBJECTS) $(KERNEL_OBJECTS) $(KERNEL_HEADER_DEPS) rm -f sys/include/machine @@ -91,7 +120,6 @@ sys/include/machine/: base/boot/hyra-kernel: $(KERNEL_OBJECTS) $(KERNEL_ASMOBJECTS) rm -rf iso_root - mkdir -p base/boot/ $(PROMPT) " LD " $(shell pwd)/base/boot/hyra-kernel $(LD) $(KERNEL_LDFLAGS) $(KERNEL_OBJECTS) $(KERNEL_ASMOBJECTS) -o base/boot/hyra-kernel tools/ksyms sys/kern/ksyms.c base/boot/hyra-kernel |