将makefile中的gcc字样用$(CC)环境变量代替

This commit is contained in:
longjin
2022-10-16 11:08:32 +08:00
parent af37e98979
commit fbe1e23e97
45 changed files with 91 additions and 90 deletions

View File

@ -22,14 +22,14 @@ kernel_subdirs := common driver process debug filesystem time arch exception mm
head.o: head.S
gcc -E head.S > _head.s # 预处理
$(CC) -E head.S > _head.s # 预处理
as $(ASFLAGS) -o head.o _head.s
main.o: main.c
# -fno-builtin: 不使用C语言内建函数
# The -m64 option sets int to 32bits and long and pointer to 64 bits and generates code for AMDs x86-64 architecture.
gcc $(CFLAGS) -c main.c -o main.o
$(CC) $(CFLAGS) -c main.c -o main.o
all: kernel