Browse Source

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

liric 2 years ago
parent
commit
518ce3818c
6 changed files with 10 additions and 9 deletions
  1. 1 0
      .gitignore
  2. 2 2
      kernel/Makefile
  3. 2 2
      kernel/exception/Makefile
  4. 2 2
      kernel/process/Makefile
  5. 2 2
      kernel/smp/Makefile
  6. 1 1
      run.sh

+ 1 - 0
.gitignore

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

+ 2 - 2
kernel/Makefile

@@ -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 

+ 2 - 2
kernel/exception/Makefile

@@ -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

+ 2 - 2
kernel/process/Makefile

@@ -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

+ 2 - 2
kernel/smp/Makefile

@@ -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

+ 1 - 1
run.sh

@@ -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