makefile

来自「Jazmyn is a 32-bit, protected mode, mult」· 代码 · 共 22 行

TXT
22
字号
CPPFLAGS = -ffreestanding -I..\include -nostdlib -fno-builtin -fno-rtti -fno-exceptions
LIBPATH = ..\lib\libc

init:
	nasm -f aout -o call.o call.asm
	gcc -c init.c -o init.o $(CPPFLAGS)
	ld -T link.ld -o ..\bin\init.com call.o init.o $(LIBPATH)\libc.a
	del *.o
	copy ..\bin\init.com g:\

shell:
	gcc -c shell.c -o shell.o $(CPPFLAGS)
	ld -T link.ld -o ..\bin\shell.com ..\lib\crt0.o shell.o $(LIBPATH)\libc.a
	del *.o
	copy ..\bin\shell.com g:\bin\

dir:
	gcc -c dir.c -o dir.o $(CPPFLAGS)
	ld -T link.ld -o ..\bin\dir.com ..\lib\crt0.o dir.o $(LIBPATH)\libc.a
	del *.o
	copy ..\bin\dir.com g:\bin\

⌨️ 快捷键说明

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