📄 master.mif
字号:
proj_name = wrc
name = wrc
!ifeq sys_dll 1
xname = $(name)e.dll
!else
xname = $(name)e.exe
!endif
!ifndef wrc_autodepends
wrc_autodepends = .AUTODEPEND
!endif
additional_cleanup = ytab.* ytab2.* ytabw.c
!include cproj.mif
!include defrule.mif
!include deftarg.mif
#always use the most up to date wres library
!include wres.mif
.EXTENSIONS : .y .key .gh .res .rc
!ifeq release 0
!ifeq host_os nt
!ifneq host_cpu axp
TRACK_MEM_OPTS = -DRCMEM_DEBUG
!else # axp: -DRCMEM_DEBUG version is NOT working! Fix me!
!endif
!else
TRACK_MEM_OPTS = -DRC_USE_TRMEM -of+
WRC_USE_TRMEM = 1
!endif
!endif
objs = ytabw.obj ytab2.obj keyword.obj keyword2.obj errors.obj &
errprt.obj exeobj.obj exeres.obj exeres2.obj exerespe.obj &
exereslx.obj exelxobj.obj exeseg.obj exeutil.obj global.obj &
layer0.obj param.obj pass2.obj rc.obj rcio.obj &
rcmem.obj rcstr.obj ppalloc.obj scan.obj scan2.obj semaccel.obj &
semantic.obj semdiag.obj semmenu.obj semver.obj semtbar.obj &
semantc2.obj sem2diag.obj sem2menu.obj sem2sngl.obj &
sem2str.obj sem2accl.obj sem2help.obj &
semraw.obj semsingl.obj semstr.obj swchar.obj dbtable.obj &
preproc.obj ppexpr.obj ppmacro.obj tmpctl.obj autodep.obj &
rcldstr.obj rcalloc1.obj rcalloc0.obj sharedio.obj semresfl.obj &
semutil.obj leadbyte.obj
!ifeq sys_dll 1
objs += rcdll.obj libmain.obj idemsgpr.obj
!endif
!ifeq release 0
splice_opts = -kDEBUG
!ifeq WRC_USE_TRMEM 1
objs += trmem.obj
!endif
!endif
# cflags stuff
###############
extra_c_flags = -DYYDEBUG -DSCANDEBUG
!ifeq host_os nt
extra_c_flags += -DNT_HOSTED
!endif
!ifeq sys_dll 1
extra_c_flags += -DDLL_COMPILE
!endif
extra_c_flags_rcalloc0 = $(TRACK_MEM_OPTS)
extra_c_flags_rcalloc1 = $(TRACK_MEM_OPTS)
extra_c_flags_rcmem = $(TRACK_MEM_OPTS)
# lflags stuff
###############
extra_l_flags = option map
extra_l_flags_osi = option symfile
extra_l_flags_os2 = option modname=$(name)
extra_l_flags_nt = option modname=$(name)
!ifeq sys_dll 1
extra_l_flags_nt += option offset=0x69800000
!endif
# systems where version resources must be added to .DLL
build_rc_nt_386 = nt
!ifdef build_rc_$(host_os)_$(host_cpu)
res_objs = version.res
!endif
# where to look for various files
.c : .;$(wrc_dir)/c;$(cpp_dir);$(trmem_dir);$(watcom_dir)/c
.y : $(wrc_dir)/y
.key : $(wrc_dir)/hash
.h : $(wrc_dir)/h;$(trmem_dir)
inc_dirs = -I. -I"$(wrc_dir)/h" -I"$(wres_dir)/h" -I"$(fe_misc_dir)/h" -I"$(cpp_dir)" -I$(trmem_dir)
# explicit rules
!ifeq sys_dll 1
$(name).lib: $(name)e.dll $(__MAKEFILES__)
$(librarian) $(libflags) $@ +$[@
!else ifdef bootstrap
$(name)e.exe : usage.h rcmsg.gh $(objs) clibext.obj $(wres_lib)
$(cc) $(objs) clibext.obj -o $@ $(wres_lib)
!else
$(name)e.exe : usage.rc usagej.rc rcmsg.gh $(objs) $(name).res $(wres_lib)
!ifeq host_os osi
$(linker) $(lflags) name $^&.rex file { $(objs) } lib {$(wres_lib)}
$(w32bind) $^&.rex $@ $(os2ldr)
@rm -f $^&e.rex
!else
$(linker) $(lflags) name $@ file { $(objs) } lib {$(wres_lib)}
!endif
wstrip -q -a -r $@ . $(name).res
!endif
$(name)e.dll : usage.rc usagej.rc rcmsg.gh $(objs) $(name).res $(wres_lib) $(res_objs)
$(linker) $(lflags) name $@ file { $(objs) } lib {$(wres_lib)}
!ifdef build_rc_$(host_os)_$(host_cpu)
$(rc) -k version.res $^@
!endif
wstrip -q -a -r $@ . $(name).res
# ytab.c is renamed to ytabw.c to avoid filename conflict
ytabw.c ytab.gh : rc.y $(wrc_dir)/y/yydriver.c rcmem.h
$(byacc) -d -b $[@ $[:yydriver.c >$(nulldevice)
@cp ytab.c ytabw.c
@rm -f ytab.c
@cp ytab.h ytab.gh
@rm -f ytab.h
ytab2.c ytab2.gh : rcos2.y $(wrc_dir)/y/yydrivr2.c rcmem.h
$(byacc) -d -b $[@ $[:yydrivr2.c >$(nulldevice)
@cp ytab.c ytab2.c
@rm -f ytab.c
@cp ytab.h ytab2.gh
@rm -f ytab.h
./findhash.exe: $(fe_misc_dir)/c/findhash.c
$(bld_cl) $(wcl_util_opts) $<
weights.gh keywords.gh : ./findhash.exe ../hash/rc.key
$[@ -q -m ../hash/rc.key
weights2.gh keyword2.gh : ./findhash.exe ../hash/rcos2.key
$[@ -q -m ../hash/rcos2.key
@cp keywords.gh keyword2.gh
@rm -f keyword.gh
@cp weights.gh weights2.gh
@rm -f weights.gh
$(name).res : ../rc.rc .AUTODEPEND
$(rc_aui) -ad -I../h $[@ -fo=$^@
rcmsg.gh : ../h/rc.msg
$(vi) -s $(sdk_dir)/misc/msgtoh.vi -p"$^@" $[@
usage.rc : $(wrc_dir)/usage.sp
wsplice -kENGLISH -kIS_RC -k$(host_os) $(splice_opts) -t8 -f "%+(MSG_USE_E_BASE+%$#-1), \"%s\"" ../usage.sp usage.rc
usagej.rc : $(wrc_dir)/usage.sp
wsplice -kJAPANESE -kIS_RC -k$(host_os) $(splice_opts) -t8 -f "%+(MSG_USE_J_BASE+%$#-1), \"%s\"" ../usage.sp usagej.rc
!ifdef bootstrap
usage.h: $(wrc_dir)/usage.sp
tr -d "\015" <$< | sed 's/\(.*\)/"\1",/' | sed 's;/;-;' >$@
!endif
keyword.obj : keyword.c keywords.gh weights.gh .AUTODEPEND
keyword2.obj : keyword2.c keyword2.gh weights2.gh .AUTODEPEND
version.res: version.rc
$(rc) $(rc_flags) $(inc_path) -r $[@ -fo=$^@
./genverrc.exe : $(fe_misc_dir)/c/genverrc.c
$(bld_cl) $[@ $(wcl_util_opts) -D_VERSION=$(bld_ver)
!ifndef patch_level
patch_level=0
!endif
version.rc : ./genverrc.exe ../h/version.rc $(fe_misc_dir)/c/genverrc.c
$[@ ../h/version.rc version.rc $$ $(name).dll $(patch_level)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -