swh:1:snp:505c374fd75bb208ae4e9a54e64bb310bc49295e
Raw File
Tip revision: 6d4ba2f91a4d1e2a5b3299eae341edd359aaaf47 authored by Nic Volanschi on 30 January 2024, 16:37:33 UTC
REMOVEME: remove flag to skip 8 odoc errors
Tip revision: 6d4ba2f
Makefile
# SPDX-FileCopyrightText: 2023 Nomadic Labs <contact@nomadic-labs.com>
#
# SPDX-License-Identifier: MIT

.PHONY: all
all: build test check

# In some situations we might want to override the compilation target.
NATIVE_TARGET ?=

ifneq ($(NATIVE_TARGET),)
NATIVE_OPT := --target="$(NATIVE_TARGET)"
endif

.PHONY: build
build:
	@cargo build --release --workspace $(NATIVE_OPT)
	@make -C dummy_kernel build
	@make -C jstz build

.PHONY: build-sandbox
build-sandbox:
	@cargo build --release --package risc-v-sandbox $(NATIVE_OPT)

.PHONY: build-deps
build-deps:
	@exec ./install-rust-std-hermit.sh
	@rustup component add rustfmt clippy

.PHONY: test
test:
	@cargo test --workspace
	@make -C dummy_kernel test
	@make -C jstz build

.PHONY: check
check:
	@cargo check --workspace --all-targets
	@cargo clippy --workspace --all-targets -- --deny warnings
	@make -C dummy_kernel check
	@make -C jstz check

.PHONY: clean
clean:
	@cargo clean
	@make -C dummy_kernel clean
	@make -C jstz clean
back to top