依然是一些针对Mac编译环境的适配

This commit is contained in:
liric 2022-09-15 21:19:20 +08:00
parent 499d32d17c
commit 518ce3818c
6 changed files with 10 additions and 9 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@
DragonOS.iso
.idea/
kernel/kernel
.DS_Store
*.o
*.s

View File

@ -22,8 +22,8 @@ kernel_subdirs := common driver process debug filesystem time arch exception mm
head.o: head.S
gcc -E head.S > head.s # 预处理
as $(ASFLAGS) -o head.o head.s
gcc -E head.S > _head.s # 预处理
as $(ASFLAGS) -o head.o _head.s
main.o: main.c

View File

@ -5,8 +5,8 @@ CFLAGS += -I .
all: entry.o irq.o softirq.o trap.o
entry.o: entry.S
gcc -E entry.S > entry.s
as $(ASFLAGS) -o entry.o entry.s
gcc -E entry.S > _entry.s
as $(ASFLAGS) -o entry.o _entry.s
trap.o: trap.c
gcc $(CFLAGS) -c trap.c -o trap.o

View File

@ -6,8 +6,8 @@ CFLAGS += -I .
procs.o: proc.S
gcc -E proc.S > proc.s
as $(ASFLAGS) -o procs.o proc.s
gcc -E proc.S > _proc.s
as $(ASFLAGS) -o procs.o _proc.s
process.o: process.c
gcc $(CFLAGS) -c process.c -o process.o

View File

@ -6,8 +6,8 @@ all: apu_boot.o smp.o
apu_boot.o: apu_boot.S
gcc -E apu_boot.S > apu_boot.s # 预处理
as $(ASFLAGS) -o apu_boot.o apu_boot.s
gcc -E apu_boot.S > _apu_boot.s # 预处理
as $(ASFLAGS) -o apu_boot.o _apu_boot.s
smp.o: smp.c
gcc $(CFLAGS) -c smp.c -o smp.o

2
run.sh
View File

@ -159,7 +159,7 @@ qemu_trace_usb=trace:usb_xhci_reset,trace:usb_xhci_run,trace:usb_xhci_stop,trace
qemu_accel=kvm
if [ "${OS}" == "Darwin" ]; then
if [ $(uname) == Darwin ]; then
qemu_accel=hvf
fi