master.mif

来自「开放源码的编译器open watcom 1.6.0版的源代码」· MIF 代码 · 共 76 行

MIF
76
字号
#
# this make include file is used to build all the win examples
#
# It assumes that the following make variables are declared by the makefile
# that includes it:
#
#       CC                      the name of the C compiler to use to create
#                               the .obj files
#       CDIR                    directories other than .. to be searched for
#                               .c files
#       CFLAGS                  any compiler flags needed to build the
#                               object files
#       name                    the name of the EXE file to build (without
#                               any extension)
#       LNK                     the name of the linker command file
#       OBJS                    a list of the .obj files needed to build
#                               the EXE
#       resources               a list of all files the .res file is
#                               dependent upon
#       res1_flags              flags to be used by the resource compiler's
#                               first pass
#       res2_flags              flags to be used by the resource compiler's
#                               second pass
#       lnk_dependencies        a list of files the linker command file
#                               depends upon
#       platform                Win32 for Win9x/Me/NT/2K/XP, Win16 for 3.x/Win386
#
# In addition the makefile must declare a procedure called linkit that
# that can be used to add commands to the linker command file

!ifeq platform Win32
CFLAGS += -i=$(%WATCOM)\h;$(%WATCOM)\h\nt
RCINCS += $(%WATCOM)\h\nt
!else
CFLAGS += -i=$(%WATCOM)\h;$(%WATCOM)\h\win
RCINCS += $(%WATCOM)/h/win
!endif

CFLAGS += -zq -oaxt -d2 -w4

$(name).exe : $(OBJS) $(name).res $(LNK)
    wlink @$(LNK)
    @%make bindit

$(name).res : $(name).rc $(resources)
    wrc -q -r -i=.. -i=$(RCINCS) -fo=./$(name).res $(res1_flags) $[@

$(LNK) : $(lnk_dependencies)
    %create $(LNK)
    @%append $(LNK) debug all
    @%append $(LNK) name $(name)
    @%append $(LNK) op map, quiet
    @%make linkit
    @for %i in ($(OBJS)) do @%append $(LNK) file %i


.EXTENSIONS:
.EXTENSIONS: .exe
.EXTENSIONS: .obj
.EXTENSIONS: .c .h .dlg .rc .ico .bmp .cur

.c:..;$(CDIR)
.ico:..
.bmp:..
.cur:..
.rc:..
.dlg:..

.c.obj :
        $(CC) $(CFLAGS) $[*

clean: .symbolic
    rm -f *.obj *.err *.exe *.lnk *.res *.rex *.lib *.sym *.map
    rm -f *.lk1 *.mk1 *.mk

⌨️ 快捷键说明

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