⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ming.mak

📁 一个类linux的dos下开发的操作系统.
💻 MAK
字号:
# defines
.SUFFIXES: .x
MAKEFILE=ming.mak

# uncomment the next line to rebuild everything if makefile changes
#MAKEDEP=$(MAKEFILE)

# chose ELF, COFF, or PE in the next line
LSCRIPT	=../ldscript/peuser.ld

INCDIR	=../inc
CFLAGS	=-g -Wall -W -O2 -I$(INCDIR) -fno-builtin -nostdinc
LFLAGS	=-g -T$(LSCRIPT) --image-base 0
LIBS	=../tinylib/libc.a

# targets
all:	hello.x protect.x time.x echo.x tetris.x

clean:
	for %f in (*.o *.x *.sym *.lst) do del %f

# implicit rules
.c.o:
	gcc $(CFLAGS) -c -o$@ $<

.o.x:
	ld $(LFLAGS) -o $@ $< $(LIBS)
#	objdump --line-numbers --source $@ >x
#	move /y x $*.lst
#	nm --line-numbers $@ | sort >x
#	move /y x $*.sym
	strip $@

# dependencies
hello.o: hello.c $(LIBS) $(LSCRIPT) $(MAKEDEP)

protect.o: protect.c $(LIBS) $(LSCRIPT) $(MAKEDEP)

time.o: time.c $(LIBS) $(LSCRIPT) $(MAKEDEP)

hello.x: hello.o $(LIBS) $(LSCRIPT) $(MAKEDEP)

protect.x: protect.o $(LIBS) $(LSCRIPT) $(MAKEDEP)

time.x: time.o $(LIBS) $(LSCRIPT) $(MAKEDEP)

echo.x: echo.o $(LIBS) $(LSCRIPT) $(MAKEDEP)

tetris.x: tetris.o $(LIBS) $(LSCRIPT) $(MAKEDEP)

⌨️ 快捷键说明

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