mirror of
https://github.com/XunilGroup/XunilOS.git
synced 2026-06-02 12:44:24 +02:00
2a73c3aeb4
interrupts with IRQ and syscalls, make phys_to_virt checked, recreate stack on aarch64, make serial console finally line wrap and have max height correctly, add U64Buf for when i need number debug, rename mouse and keyboard files to kmi and merge them, add non-working pl050 support
37 lines
862 B
Makefile
37 lines
862 B
Makefile
# Nuke built-in rules and variables.
|
|
MAKEFLAGS += -rR
|
|
.SUFFIXES:
|
|
|
|
include ../config.mk
|
|
|
|
ifeq ($(RUST_TARGET),)
|
|
override RUST_TARGET := $(KARCH)-unknown-none
|
|
ifeq ($(KARCH),riscv64)
|
|
override RUST_TARGET := riscv64gc-unknown-none-elf
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(RUST_PROFILE),)
|
|
override RUST_PROFILE := dev
|
|
endif
|
|
|
|
override RUST_PROFILE_SUBDIR := $(RUST_PROFILE)
|
|
ifeq ($(RUST_PROFILE),dev)
|
|
override RUST_PROFILE_SUBDIR := debug
|
|
endif
|
|
|
|
# Default target.
|
|
.PHONY: all
|
|
all:
|
|
RUSTFLAGS="-C relocation-model=static" cargo build --target $(RUST_TARGET) --profile $(RUST_PROFILE)
|
|
cp target/$(RUST_TARGET)/$(RUST_PROFILE_SUBDIR)/$$(cd target/$(RUST_TARGET)/$(RUST_PROFILE_SUBDIR) && find -maxdepth 1 -perm -111 -type f) kernel
|
|
|
|
# Remove object files and the final executable.
|
|
.PHONY: clean
|
|
clean:
|
|
cargo clean
|
|
rm -rf kernel
|
|
|
|
.PHONY: distclean
|
|
distclean: clean
|