diff options
author | Ian Moffett <ian@osmora.org> | 2024-07-04 23:42:44 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-07-04 23:42:44 -0400 |
commit | 4f9c6864188be29fd80d4e10c6e6da7d80fc5d10 (patch) | |
tree | cbaac9bff5d5da8d4ae9dcfc1a03e1cc9dd32d52 /Makefile.in | |
parent | ae83d32a56c38e5c7cd4497d64432387d4350a55 (diff) |
usr: Add initial userland
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in index 8955004..aeb6911 100644 --- a/Makefile.in +++ b/Makefile.in @@ -45,16 +45,36 @@ override KERNEL_OBJECTS = $(KERNEL_CFILES:.c=.o) override KERNEL_ASMOBJECTS = $(KERNEL_ASMFILES:.S=.S.o) override KERNEL_HEADER_DEPS = $(KERNEL_CFILES:.c=.d) +######################## +# Userland +######################## +override SBIN_MAKEDIRS = $(shell find usr.sbin/ -type d -name "*" | awk '!/usr.sbin\/$$/') +override USRDIR = $(shell pwd)/base/usr + .PHONY: all -all: base base/boot/hyra-kernel ramfs iso +all: base libc sbin base/boot/hyra-kernel ramfs iso rm -f sys/include/machine rm -rf iso_root +.PHONY: sbin +sbin: $(SBIN_MAKEDIRS) + $(MAKE) -C $^ -I$(shell pwd)/builddeps \ + LDSCRIPT=$(shell pwd)/usr.sbin/link.ld USRDIR=$(USRDIR) + find $^ -type f -executable -exec mv {} base/usr/sbin/ \; + +.PHONY: libc +libc: + $(MAKE) -C lib/libc/ -I$(shell pwd)/builddeps \ + USRDIR=$(USRDIR) + cp lib/libc/build/libc.a base/usr/lib/ + .PHONY: base base: mkdir -p base/usr/lib/ mkdir -p base/usr/sbin/ mkdir -p base/boot/ + mkdir -p base/usr/include/sys/ + cp sys/include/sys/*.h base/usr/include/sys/ .PHONY: cross cross: |