create common.mk for os projects

Makefiles of rvos projects contains too many duplicated contents.
Cleanup and move it into a new common.mk file for os only, this will
not touch asm samples.

Finally the common..mk which was used for both asm & os is removed.

Signed-off-by: Wang Chen <wangchen20@iscas.ac.cn>
This commit is contained in:
Wang Chen
2024-03-26 09:00:39 +08:00
committed by Chen Wang
parent 992b0ba91c
commit a2617cffa6
16 changed files with 82 additions and 489 deletions

View File

@@ -1,3 +1,6 @@
# Note: The Makefile for each project is just a symbol-link to the build.mk
# under the "asm" folder.
EXEC = test
SRC = ${EXEC}.s

View File

@@ -1,4 +1,15 @@
include ../../common.mk
# This file will be included by the build.mk.
CROSS_COMPILE = riscv64-unknown-elf-
CFLAGS = -nostdlib -fno-builtin -march=rv32g -mabi=ilp32 -g -Wall
QEMU = qemu-system-riscv32
QFLAGS = -nographic -smp 1 -machine virt -bios none
GDB = gdb-multiarch
CC = ${CROSS_COMPILE}gcc
OBJCOPY = ${CROSS_COMPILE}objcopy
OBJDUMP = ${CROSS_COMPILE}objdump
.DEFAULT_GOAL := all
all: