refactor: move DOOM out to the mtkports ports tree
Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_018Ae69wJS7sueQMUwNxV3nX
This commit is contained in:
+26
@@ -181,6 +181,20 @@ kernel: kernel-deps
|
||||
programs:
|
||||
$(MAKE) -C programs
|
||||
|
||||
# Build out-of-tree ports (~/dev/mtkports) and stage their app bundles into
|
||||
# programs/bin/apps/. Opt-in: the base ISO ships only what lives in
|
||||
# programs/src/, so this is never a dependency of the default build. Run it
|
||||
# before 'make ramdisk' to include ports in the image.
|
||||
MTKPORTS ?= $(HOME)/dev/mtkports
|
||||
|
||||
.PHONY: ports
|
||||
ports: programs
|
||||
@if [ -d "$(MTKPORTS)" ]; then \
|
||||
$(MAKE) -C "$(MTKPORTS)" install MONTAUKOS="$(CURDIR)"; \
|
||||
else \
|
||||
echo "ports: $(MTKPORTS) not found - skipping (set MTKPORTS=/path/to/mtkports)"; \
|
||||
fi
|
||||
|
||||
.PHONY: ramdisk
|
||||
ramdisk: limine/limine kernel programs
|
||||
mkdir -p programs/bin/boot/limine
|
||||
@@ -245,6 +259,18 @@ release: limine/limine kernel ramdisk
|
||||
cp kernel/bin-$(ARCH)/kernel iso_root/boot/
|
||||
strip iso_root/boot/kernel
|
||||
cp -r programs/bin .release-tmp
|
||||
# A release ISO ships only in-tree apps, so drop any out-of-tree port bundles
|
||||
# that happen to be staged in programs/bin/apps (each carries a .port marker).
|
||||
# Pass RELEASE_WITH_PORTS=1 to deliberately cut a ports-included image.
|
||||
ifneq ($(RELEASE_WITH_PORTS),1)
|
||||
@for m in $$(find .release-tmp/apps -name .port 2>/dev/null); do \
|
||||
d=$$(dirname $$m); \
|
||||
echo "release: excluding port bundle $$(basename $$d)"; \
|
||||
rm -rf "$$d"; \
|
||||
done
|
||||
else
|
||||
@echo "release: RELEASE_WITH_PORTS=1 - including out-of-tree port bundles"
|
||||
endif
|
||||
find .release-tmp -name '*.elf' -exec strip {} +
|
||||
./scripts/mkramdisk.sh .release-tmp iso_root/boot/ramdisk.tar
|
||||
rm -rf .release-tmp
|
||||
|
||||
Reference in New Issue
Block a user