-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
44 lines (34 loc) · 1.48 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
# Copyright 2025 ETH Zurich and University of Bologna.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
# Authors:
# - Philip Wiese <[email protected]>
# - Victor Jung <[email protected]>
ROOT_DIR := $(patsubst %/,%, $(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
INSTALL_PREFIX ?= install
GVSOC_INSTALL_DIR ?= ${ROOT_DIR}/${INSTALL_PREFIX}
GVSOC_COMMIT_HASH ?= ffba6ded9abf0a2c86d0b4096ec20a4392af96ad
CLANG_FORMAT_EXECUTABLE ?= clang-format
help:
@echo "Usage: make <target>"
@echo ""
@echo "Available Targets:"
@echo " - gvsoc: Install GVSoC @ ${GVSOC_INSTALL_DIR}"
@echo " - export-symbols: Print the list of symbols to export to run the SDK's tests"
@echo " - format: Format all code"
format:
@echo "Formatting code..."
@python scripts/run_clang_format.py -ir tests/ hal/ targets/ drivers/ devices/ --clang-format-executable=$(CLANG_FORMAT_EXECUTABLE)
@python -m yapf -rip .
export-symbols:
@echo "Please export the following symbols:"
@echo "GVSOC_HOME=${GVSOC_INSTALL_DIR}/gvsoc"
gvsoc:
mkdir -p ${GVSOC_INSTALL_DIR} && cd ${GVSOC_INSTALL_DIR} && \
git clone [email protected]:gvsoc/gvsoc.git && \
cd ${GVSOC_INSTALL_DIR}/gvsoc && git checkout ${GVSOC_COMMIT_HASH} && \
git submodule update --init --recursive && \
pip install -r core/requirements.txt && \
pip install -r gapy/requirements.txt && \
CXX=g++-11.2.0 CC=gcc-11.2.0 CMAKE=cmake-3.18.1 make all TARGETS=chimera
.PHONY: format help export-symbols gvsoc