From d4542c336a6cbfb43497055f19a85e7713f2eed7 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sun, 25 Jun 2023 16:38:32 +0200 Subject: ports: reimplement the ports system from scratch side stuff: * removed sltar since it wasn't working anyways * made signal() no longer panic, as that broke certain ports (oops) * doom now ships with the FreeDOOM WADs * /usr/ was aliased to /init/usr/, more directories were added to /bin/ to improve compat with ports --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 586f401..764f7f0 100644 --- a/Makefile +++ b/Makefile @@ -31,13 +31,14 @@ ifndef QEMU_DISPLAY QFLAGS += -display none endif +PORTS = define from_sources $(patsubst src/%,out/obj/%.o,$(shell find $(1) -type f,l -name '*.[csS]')) endef -.PHONY: all portdeps boot check clean +.PHONY: all portdeps boot check clean ports all: portdeps out/boot.iso check portdeps: out/libc.a out/libm.a src/user/lib/include/__errno.h @@ -116,13 +117,19 @@ $(foreach bin,$(USERBINS),$(eval $(call userbin_template,$(bin)))) out/obj/user/app/ext2fs/ext2/example.c.o: @touch $@ +# portdeps is phony, so ports/% is automatically "phony" too +ports: $(patsubst %,ports/%,$(PORTS)) +ports/%: portdeps + +$@/port install + out/initrd/%: sysroot/% @mkdir -p $(@D) @cp $< $@ out/initrd.tar: $(patsubst sysroot/%,out/initrd/%,$(shell find sysroot/ -type f)) \ $(patsubst %,out/initrd/bin/amd64/%,$(USERBINS)) \ - $(shell find out/initrd/) + $(shell find out/initrd/) \ + ports @cd out/initrd; tar chf ../initrd.tar * -- cgit v1.2.3