#
# Copyright (c) 2026, Chloe M.
# Provided under the BSD-3 clause
#
# Description:  Kernel build script
# Author:		Chloe M.
#

include ../mk/ptos.mk

.PHONY: all
all: target spkg ke machine post

.PHONY: target
target:
	mkdir -p target/machine/
	rsync -avr head/arch/$(PT_TARGET_ARCH)/*.h target/machine/

.PHONY: ke
ke:
	cd ke/; $(MAKE) $(PASSDOWN_ARGS)

.PHONY: spkg
spkg:
	cd ../spkg/; $(MAKE) $(PASSDOWN_ARGS)

.PHONY: machine
machine:
	cd arch/$(PT_TARGET_ARCH)/; $(MAKE) $(PASSDOWN_ARGS)

.PHONY: post
post:
	rm -rf target/
