📄 makefile
字号:
#*****************************************************************************#
#*****************************************************************************#
#** **#
#** makefile **#
#** **#
#** Copyright (C) 2005-2006 Universe Corporation **#
#** **#
#** All Rights Reserved **#
#** **#
#** Lanzhou University Of Tecnology **#
#** **#
#** (0931)-2975931 **#
#** **#
#*****************************************************************************#
#*****************************************************************************#
#+ directories definitions +++++++++++++++++++++++++++++++++++++++++++++++++++#
DIR_BOOT = .\boot
DIR_OUTPUT = .\output
DIR_TOOLS = .\tools
#+ files definitions +++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
DEST = universe
#- boot ----------------------------------------------------------------------#
OBJS_BOOT = \
$(DIR_OUTPUT)\loader.obj \
$(DIR_OUTPUT)\init_r.obj \
$(DIR_OUTPUT)\init_p.obj
#+ tools definitions +++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
AC = ml
LK = link
ACO = /c /Cp /W2 /nologo
LKO = /NOIGNORECASE /BATCH /NOLOGO
E2B = exe2bin
#+ make commands +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
all: $(DIR_OUTPUT)\loader.bin \
$(DIR_OUTPUT)\$(DEST).bin
{$(DIR_BOOT)}.asm{$(DIR_OUTPUT)}.obj:
@$(AC) $(ACO) /Fo$@ $?
$(DIR_OUTPUT)\loader.exe: $(DIR_OUTPUT)\loader.obj
@$(LK) $(LKO) $?,$@;
$(DIR_OUTPUT)\loader.bin: $(DIR_OUTPUT)\loader.exe
@$(E2B) $? $@
$(DIR_OUTPUT)\$(DEST).exe: $(OBJS_BOOT)
@$(LK) $(LKO) @<<
$(**: = +^
),$(DIR_OUTPUT)\$(DEST).exe;
<<
$(DIR_OUTPUT)\$(DEST).bin: $(DIR_OUTPUT)\$(DEST).exe
@$(E2B) $? $@
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
# phony objects #
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
.PHONY: cleanall cleanobj cleanexe cleanbin
cleanall: cleanobj cleanexe cleanbin
cleanobj:
-rm $(DIR_OUTPUT)\*.obj
cleanexe:
-rm $(DIR_OUTPUT)\*.exe
cleanbin:
-rm $(DIR_OUTPUT)\*.bin
#*****************************************************************************#
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -