📄 makefile
字号:
#
#
#
#
# 负责编译 引导记录 和 setup.bin
#
#
#
setupo = setup.o setup/detectmem.o setup/setupvga.o setup/8259.o
# 此makefile的最终任务
boot:fsector.bin setup.bin
$(CP) fsector.bin ..\build
partcopy setup.bin 0 1 setup.bin 7ff
$(CP) setup.bin ..\build
# 编译引导记录
fsector.bin: fsector.s
$(AS) -o $@ $<
# 编译setup.bin, 有点特殊
setup.bin: $(setupo)
$(LD) $(LDFLG) $(setupo) -Ttext 0x0 -e setup_entry -O binary -o setup.binary
objcopy -R .comment -R .note -S -O binary setup.binary $@
# 默认规则
%.o:%.s
$(AS) -f aout -o $@ $<
#
#
#
clean:
$(RM) *.o
$(RM) *.binary
$(RM) setup\*.o
$(RM) fsector.bin
$(RM) setup.bin
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -