Kernel now links string
This commit is contained in:
parent
4512a93249
commit
bdf4228a18
1 changed files with 5 additions and 4 deletions
9
Makefile
9
Makefile
|
@ -17,6 +17,7 @@ CFLAGS += -march=rv64gc -mabi=lp64
|
|||
CFLAGS += -ffreestanding -fno-common -nostdlib -mno-relax
|
||||
|
||||
CFLAGS += -I.
|
||||
CFLAGS += -Ilib
|
||||
|
||||
CFLAGS += -fno-stack-protector # Prevents code that needs libc / runtime support
|
||||
CFLAGS += -MD # Generate header dependency files (.d)
|
||||
|
@ -26,7 +27,7 @@ CFLAGS += -fno-omit-frame-pointer # More reliable backtraces in GDB
|
|||
|
||||
all: kernel.elf
|
||||
|
||||
kernel.elf: entry.o start.o
|
||||
kernel.elf: entry.o start.o lib/string.o
|
||||
@echo LD $@
|
||||
@$(LD) $(LDFLAGS) -o $@ $^
|
||||
|
||||
|
@ -39,10 +40,10 @@ kernel.elf: entry.o start.o
|
|||
@$(AS) $(ASFLAGS) -o $@ $<
|
||||
|
||||
qemu: kernel.elf
|
||||
@echo QEMU $@
|
||||
@qemu-system-riscv64 -machine virt -bios none -nographic -kernel kernel.elf
|
||||
@echo QEMU $<
|
||||
@qemu-system-riscv64 -machine virt -bios none -nographic -m 128M -smp 4 -kernel kernel.elf
|
||||
|
||||
clean:
|
||||
rm -f *.o *.elf *.d
|
||||
rm -f *.o *.elf *.d lib/*.o lib/*.d
|
||||
|
||||
-include *.d
|
||||
|
|
Loading…
Add table
Reference in a new issue