mirror of
https://github.com/XunilGroup/XunilOS.git
synced 2026-06-02 14:44:26 +02:00
56c5da0742
remove incorrect timer frequency set, fix interrupt handler not restoring stack ptr, handle both user and kernel aborts, remove aarch64 ps2 support, fix ELF code mapped as code making it unwritable, add assets.rs to handle both arches automatically, make PS2 x86_64 compatible with linux keycodes, always try printing kernel panic to serial
38 lines
903 B
Makefile
38 lines
903 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 := release
|
|
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) --config profile.release.debug=true
|
|
|
|
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
|