Add targets "debug" and "clean".
This commit is contained in:
parent
298d1be60c
commit
1cc3169cd0
10
Makefile
10
Makefile
@ -4,9 +4,19 @@ LD=x86_64-elf-ld
|
|||||||
run: mbr.bin
|
run: mbr.bin
|
||||||
qemu-system-i386 -drive format=raw,file=$<
|
qemu-system-i386 -drive format=raw,file=$<
|
||||||
|
|
||||||
|
debug: mbr.bin
|
||||||
|
qemu-system-i386 -drive format=raw,file=$< -s -S &
|
||||||
|
i386-elf-gdb \
|
||||||
|
-ex "target remote localhost:1234" \
|
||||||
|
-ex "set architecture i8086" \
|
||||||
|
-ex "break *0x7c00" \
|
||||||
|
-ex "continue"
|
||||||
|
|
||||||
%.o: %.S
|
%.o: %.S
|
||||||
$(AS) $^ -o $@
|
$(AS) $^ -o $@
|
||||||
|
|
||||||
mbr.bin: mbr.o
|
mbr.bin: mbr.o
|
||||||
$(LD) -Ttext=0x7c00 --oformat=binary $^ -o $@
|
$(LD) -Ttext=0x7c00 --oformat=binary $^ -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm *.bin *.o
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user