mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-24 23:40:39 +01:00
[v1.03][RISCV] Add support for compiling to RISC-V
This commit is contained in:
5
Makefile
5
Makefile
@@ -41,6 +41,11 @@ ifneq ($(OS),Windows_NT)
|
||||
SOURCE += $(SRC_DIR)sysctl.c
|
||||
HEADERS += $(SRC_DIR)sysctl.h
|
||||
endif
|
||||
else ifeq ($(arch), $(filter $(arch), riscv64 riscv32))
|
||||
SRC_DIR=src/riscv/
|
||||
SOURCE += $(COMMON_SRC) $(SRC_DIR)riscv.c $(SRC_DIR)uarch.c
|
||||
HEADERS += $(COMMON_SRC) $(SRC_DIR)riscv.h $(SRC_DIR)uarch.h
|
||||
CFLAGS += -DARCH_RISCV -Wno-unused-parameter -std=c99 -fstack-protector-all
|
||||
else
|
||||
# Error lines should not be tabulated because Makefile complains about it
|
||||
$(warning Unsupported arch detected: $(arch). See https://github.com/Dr-Noob/cpufetch#1-support)
|
||||
|
||||
Reference in New Issue
Block a user