arch ?= ppc32 target ?= powerpc-unknown-linux-gnu build_type ?= release kernel ?= target/$(target)/$(build_type)/vap linker_script := assembly/$(arch)/linker.ld KERNEL_FLAGS ?= -Zbuild-std=core,alloc cargo_config := $(shell pwd)/.cargo/config final = build/$(target)/$(build_type)/cums # ADD ARCH DEFS HERE ifeq "$(arch)" "ppc32" target := powerpc-unknown-linux-gnu kernel := target/$(target)/$(build_type)/cums linker_script := assembly/$(arch)/linker.ld KERNEL_FLAGS := --features ppc32 endif # END ARCH DEFS ifeq "$(build_type)" "release" KERNEL_FLAGS += --release endif .PHONY: all clean all: $(final) clean: @cargo clean @rm -rf build $(final): $(kernel) @mkdir -p $(shell dirname $@) @cp $(kernel) $(final) $(kernel): @RUST_TARGET_PATH="$(shell pwd)" CUMS_ARCH="$(arch)" cross +nightly build --target $(target) $(KERNEL_FLAGS)