-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
56 lines (43 loc) · 1.26 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
DOCKER_IMAGE_NAME := docker.io/library/mtkcpu:1.0.0
MAKEFILE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
lint:
poetry run black .
poetry run isort .
poetry run flakehell lint
install:
bash ./install_toolchain.sh
poetry install
update_local:
poetry run pip3 install --no-dependencies .
bump_minor:
poetry run bump2version minor
publish:
poetry run publish
update:
poetry update
build:
poetry build
build-docker:
bash ./build_docker_image.sh
build-docker-riscv-tests:
docker build -f Dockerfile.riscv-tests -t riscv-tests .
fetch-riscv-tests-isa: build-docker-riscv-tests
@rm -rf isa
@docker rm -f dummy
docker create --name dummy riscv-tests
docker cp dummy:/riscv-tests/isa .
docker rm -f dummy
fetch-gcc: export id := $(shell docker create $(DOCKER_IMAGE_NAME))
fetch-gcc: export temp := $(shell mktemp -p .)
fetch-gcc:
rm -rf riscv-none-elf-gcc
docker cp $(id):/root/.local/xPacks/@xpack-dev-tools/riscv-none-elf-gcc/ - > $(temp)
docker rm -v $(id)
tar xvf $(temp)
rm $(temp)
chmod -R +wx riscv-none-elf-gcc
@echo "== GCC downloaded from docker to host - run the following command to have it in your PATH:"
@echo 'export PATH=$$PATH:$(shell realpath riscv-none-elf-gcc/13.2.0-1.2/.content/bin)'
@echo '======'
test:
poetry run pytest -n 12