Files
5150/Makefile
2025-10-03 23:48:11 +02:00

43 lines
1.7 KiB
Makefile

dev-image = 5150-dev
.PHONY: dev-image
dev-image:
docker build -t $(dev-image) --target dev .
.PHONY: dev
dev: dev-image ## Launch a dev container
docker run -it --rm -v $(CURDIR)/src:/workspace $(dev-image)
.PHONY: binaries
binaries: ## Build all small binaries
docker build --build-arg TARGET=readfloppy.bin -o . --target=export .
docker build --build-arg TARGET=writefloppy.bin -o . --target=export .
docker build --build-arg TARGET=crc16.bin -o . --target=export .
docker build --build-arg TARGET=hello.bin -o . --target=export .
docker build --build-arg TARGET=copy.bin -o . --target=export .
docker build --build-arg TARGET=call.bin -o . --target=export .
docker build --build-arg TARGET=format.bin -o . --target=export .
docker build --build-arg TARGET=readio.bin -o . --target=export .
docker build --build-arg TARGET=writeio.bin -o . --target=export .
.PHONY: polos
polos: ## Build polOS components
docker build --build-arg TARGET=fat12boot.bin -o . --target=export .
docker build --build-arg TARGET=polio.com -o . --target=export .
docker build --build-arg TARGET=polmon.com -o . --target=export .
docker build --build-arg TARGET=mushroom.com -o . --target=export .
docker build --build-arg TARGET=hello.com -o . --target=export .
docker build --build-arg TARGET=ftpget.com -o . --target=export .
.PHONY: floppy
floppy: ## Make a bootable floppy image
docker build --build-arg TARGET=polos.img -o . --target=export .
.PHONY: help
help: ## Show this help
@echo Noteworthy targets:
@egrep '^[a-zA-Z_-]+:.*?## .*$$' $(firstword $(MAKEFILE_LIST)) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help