master.mif
来自「开放源码的编译器open watcom 1.6.0版的源代码」· MIF 代码 · 共 219 行
MIF
219 行
name = $(proj_name)
.extensions: .rc .y .re .gh .msg
additional_cleanup = *.y *.re asytab.c asytab.h ytab.c ytab.h aslexyy.c
!include cproj.mif
!include defrule.mif
!include deftarg.mif
!include $(owl_dir)/client.mif
!include wres.mif
# yacc
#########################
yacc_flags = -b -d
#yacc_flags = -d -q
#yacc_flags = -b -d -f -u
#yacc_flags = -b "y" -l -v
yacc_src = as.y
yacc_in = as_in.y
yacc_out_c = asytab
yacc_out_h = asytab.h
lex_flags =
lex_src = scan.re
lex_in = scan_in.re
lex_out_c = aslexyy
lex_out_h =
# objects
##########
as_comm_objs = &
$(yacc_out_c).obj &
$(lex_out_c).obj &
asexpr.obj &
asopernd.obj &
asmem.obj &
asutils.obj &
asregs.obj &
assymbol.obj &
asdrectv.obj &
asdirop.obj &
asnumlab.obj &
asmsg.obj &
ashash.obj &
$(target_as_comm_objs)
as_stand_objs = &
main.obj &
obj.obj &
sections.obj &
options.obj &
preproc.obj &
ppexpr.obj &
ppmacro.obj &
ppmem.obj &
trmemcvr.obj
!ifeq release 0
as_stand_objs += trmem.obj
!endif
as_inline_objs = &
asinline.obj &
asiobj.obj
as_objs = $(as_comm_objs) $(as_stand_objs)
asi_objs = $(as_comm_objs) $(as_inline_objs)
asi_test_objs = asitest.obj trmemcvr.obj
!ifeq release 0
asi_test_objs += trmem.obj
!endif
# cflags
#########
!ifndef inline_as
as_extra_defines += -D_STANDALONE_
!endif
extra_c_flags = $(as_extra_defines)
!ifeq release 0
!ifeq host_cpu 386
as_trmem = -DTRMEM -of+
!else
as_trmem = -DTRMEM
!endif
as_yydebug = -DYYDEBUG=1
!else
dbg_extra_defines = -DNDEBUG
!endif
extra_c_flags_asitest = $(as_trmem)
!ifndef bootstrap
extra_c_flags_asmem = -fh=asmem.pch $(as_trmem)
extra_c_flags_trmemcvr = -fh=trmemcvr.pch $(as_trmem)
extra_c_flags_trmem = -fh=trmem.pch $(as_trmem)
extra_c_flags_asytab = -fh=asytab.pch $(as_yydebug)
extra_c_flags_aslexyy = -fh=aslexyy.pch
extra_c_flags_preproc = -fh=preproc.pch
extra_c_flags_ppexpr = -fh=ppexpr.pch
extra_c_flags_ppmacro = -fh=ppmacro.pch
extra_c_flags_ppmem = -fh=ppmem.pch
extra_c_flags_asexpr = -fh
extra_c_flags_asopernd = -fh
extra_c_flags_asutils = -fh
extra_c_flags_asregs = -fh
extra_c_flags_assymbol = -fh
extra_c_flags_asdrectv = -fh
extra_c_flags_asdirop = -fh
extra_c_flags_asnumlab = -fh
extra_c_flags_asmsg = -fh
extra_c_flags_asmsgj =
extra_c_flags_ashash = -fh
extra_c_flags_asinline = -fh
extra_c_flags_asiobj = -fh
extra_c_flags_main = -fh
extra_c_flags_obj = -fh
extra_c_flags_sections = -fh
extra_c_flags_options = -fh
!endif
# lflags
#########
!ifndef inline_as
libs = $(owl_lib) $(wres_lib)
!endif
# splice options
##################
!ifndef inline_as
splice_opts += -k_STANDALONE_
!endif
# include directory
####################
.c: $(as_cdir);$(trmem_dir);$(cpp_dir)
.h: $(as_hdir);$(trmem_dir);$(cpp_dir)
.y: $(as_ydir)
.re: $(as_ydir)
.rc: $(as_dir)/h
.gh: .
.msg: $(as_dir)/h
inc_dirs = -I. $(as_incs) -I"$(owl_dir)/h" -I$(cpp_dir) -I$(trmem_dir)
# explicit rules
#################
asi_lib = $(asi_dir)/asinline.lib
asi_lib_j = $(asi_dir)/asinlinj.lib
!ifdef test_inline_as
asi_test_name = asinline
$(asi_test_name).exe : $(asi_test_objs) $(asi_lib)
$(cl) $(clflags) $(asi_test_objs) $(asi_lib) $(cl_libs)
$(asi_lib) :
curr_dir=$+$(%cwd)$-
cd $(asi_dir)
!wmake -h
cd $(curr_dir)
!endif
!ifdef asi_build_lib
all_lib : msg.gh $(asi_lib) $(asi_lib_j) .symbolic
$(asi_lib) : $(asi_objs)
@rm -f $^&.lbc
@for %i in ($<) do @%append $^&.lbc +%i
$(librarian) $(libflags) $^@ @$^&.lbc
$(asi_lib_j) : $(asi_lib) asmsgj.obj
$(librarian) $(libflags) $^@ +$[@ -asmsg.obj +asmsgj.obj
!endif
$(name).exe : msg.gh $(as_objs) $(libs) $(owl_lib) $(name).res
$(cl) $(clflags) $(as_objs) $(libs) $(owl_lib) $(cl_libs)
!ifeq host_os osi
$(w32bind) $^&.rex $^@ $(os2ldr)
@rm -f $^&.rex
!endif
wstrip -q -a -r $@ . $(name).res
!ifndef inline_as
$(name).res : as.rc msg.gh
$(rc_aui) $(as_extra_defines) $(dbg_extra_defines) $[@ -fo=$^@
!endif
msg.gh : ./mkstrid.exe
$[@ $^@
./mkstrid.exe : mkstrid.c as.msg
$(bld_cl) $(wcl_util_opts) $(as_extra_defines) $(dbg_extra_defines) $(as_incs) $[@
$(yacc_in) : $(yacc_src) $(as_dir)/y/yydriver.c
wsplice $(splice_opts) $[@ $^@
$(yacc_out_c).c $(yacc_out_h) : $(yacc_in)
$(byacc) $(yacc_flags) $[@ $(as_dir)/y/yydriver.c > $(nulldevice)
$(vi) -s $(as_dir)/mif/asyy.vi -p"$(yacc_out_c).c" ytab.c
$(vi) -s $(as_dir)/mif/asyy.vi -p"$(yacc_out_c).h" ytab.h
# $(byacc) $(yacc_flags) $[@
$(lex_in) : $(lex_src)
wsplice $(splice_opts) $[@ $^.
.ERASE
$(lex_out_c).c $(lex_out_h) : $(lex_in)
$(bre2c) $(lex_flags) $[@ > $^.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?