makefile

来自「一个极小型的操作系统」· 代码 · 共 42 行

TXT
42
字号
# Makefile for Freedows Bootloader Demonstration Kernel# Programs to delete and copy files withREMOVE = rm -f# The C and C++ compilers (should be i386-GCC)GCC = gccG++ = gcc# The linkerLD  = ld# The object files belonging to the kernelOBJS = idt.o kernel.o io.o video.o 8259.o keyboard.o pit.o delay.o dma.o fdc.o gazfs.o string.o math.o mem.o# The kernel filenameKERNELFN = kernel.elf# Link the kernel statically with fixed text+data address @1M$(KERNELFN) : $(OBJS)	$(LD)  -o $@ $(OBJS)  -Ttext 0x100000# Compile the source files.cc.o:	$(G++)  -Wall -fomit-frame-pointer -O -I. -c -o $@ $<.cc.s:	$(G++)  -Wall -fomit-frame-pointer -O -I. -S -o $@ $<.c.o:	$(GCC)  -Wall -fomit-frame-pointer -O -I. -c -o $@ $<.c.s:	$(GCC)  -Wall -fomit-frame-pointer -O -I. -S -o $@ $<.S.o:	$(GCC)  -Wall -fomit-frame-pointer -c -o $@ $<# Clean up the junkclean:	$(REMOVE) $(OBJS) $(KERNELFN)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?