📄 makefile
字号:
OBJS= ../i386/start.o data.o disk.o main.oBOOTOBJS= boot.oCFLAGS= -ffreestanding -Os -Wall -I../include -march=i386LDFLAGS= -L../stand -lstand -L../i386 -li386ASFLAGS= -I../includescraper.bin: boot.bin usb.bin /bin/rm -fr scraper.bin cat boot.bin >> scraper.bin cat usb.bin >> scraper.bin# We use dd(1) to write the scraper utility directly to a disk# device. Most disks must be written in multiples of their sector# size, which is typically 512. In order to make sure the last 512# bytes is written out, we want to append an extra 512 bytes just# in case our binary image is not exactly a multiple of 512 bytes# in size. We know that the boot block image is exactly 512 bytes,# so we stick an extra copy at the end as padding. cat boot.bin >> scraper.binboot.bin: $(BOOTOBJS) ld -Bstatic -Tlink_boot.lds -o boot $(BOOTOBJS) objcopy -O binary boot boot.binusb.bin: $(OBJS) ld -Bstatic -Tlink_usb.lds -o usb $(OBJS) $(LDFLAGS) objcopy -O binary usb usb.binclean: /bin/rm -f *.o usb usb.bin boot boot.bin scraper scraper.bin
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -