📄 master.mif
字号:
#
# The master file for creating wmake.
#
##############################################################################
proj_name = wmake
xname = wmk
!ifndef wmake_autodepends
wmake_autodepends = .AUTODEPEND
!endif
# DOS code will not fit in 64k with /d2
#!ifeq host_os dos
#!ifeq host_cpu i86
#wmake_release = 1
#!endif
#!endif
!include cproj.mif
!include defrule.mif
!include deftarg.mif
.h : ../h
.h : $(watcom_dir)/h
.h : $(trmem_dir)
.c : ../c
.c : $(watcom_dir)/c
.c : $(trmem_dir)
.inc : .
.inc : ../h
!include $(orl_dir)/client.mif
!include wres.mif
echo = echo
# Compiler Flags
extra_c_flags_i86 = -zt32
inc_dirs = -I"$(wmake_dir)/h" -I"$(orl_dir)/h" -I$(trmem_dir)
!ifdef cachestat
extra_c_flags += -DCACHE_STATS
!endif
extra_rc_flags_dos = -D__DOS__
extra_rc_flags_linux = -D__LINUX__
extra_rc_flags = $(extra_rc_flags_$(host_os))
!include ../mif/wmk.mif # get our objs macro
##############################################################################
ext_qnx = qnx
ext_linux = elf
!ifdef ext_$(host_os)
ext = $(ext_$(host_os))
!else
ext = exe
!endif
# LINKER FLAGS
# large stacks are necessary for !loaddll support
# os2 seems to crash with 128k stack and wccd386 - mjc
extra_l_flags_os2 = option stack=96k
extra_l_flags_nt = option stack=0x10000k commit stack=32k
extra_l_flags_qnx = option stack=20k
!ifdef LARGE
extra_l_flags_dos = option stack=16k
!else ifdef COMPACT
extra_l_flags_dos = option stack=16k
!else
extra_l_flags_dos = option stack=4k
!endif
extra_l_flags = NAME $(xname).$(ext) OPTION MAP,statics sort
libs = $(wres_lib) $(orl_lib)
$(xname).$(ext) :: usageend.gh wmake.res $(objs) $(libs) $(__MAKEFILES__)
$(linker) $(lflags) FILE {$(objs)} LIBRARY {$(libs)}
#
# If the linker files were different (i.e. if we needed a QNX version),
# the copy would be replaced by a separate link. CSK
wstrip -q -a -r $(xname).$(ext) . wmake.res
wmake.res : ../h/wmake.rc mrcmsg.h usage.rc usagej.rc
$(rc_aui) $(extra_rc_flags) $[@ -fo=$^@
usage.rc : ../h/usage.sp
@%write usage.tmp -kIS_RC -kENGLISH -f "%+(MSG_USE_E_BASE+%$#-1), \"%s\"" $< -o "%n%n%n%n" $^@
wsplice @usage.tmp
usagej.rc : ../h/usage.sp
@%write usage.tmp -kIS_RC -kJAPANESE -f "%+(MSG_USE_J_BASE+%$#-1), \"%s\"" $< -o "%n%n%n%n" $^@
wsplice @usage.tmp
usageend.gh : usage.rc usagej.rc
@%write usage.tmp -f "%+" usage.rc -o "$#define USAGE_LAST (USAGE_BASE+%$#)%n" $^@
wsplice @usage.tmp
# usage.h : ..\h\usage.sp
# I want the usage message codes to be generated on the fly, and also
# padded by ten ( so that versions in different languages will still
# compile ). Fortunately, by simply defining more constants, we don't
# make the final program any larger. Oh well - the end justifying the
# means, I suppose. CSK
# wsplice -k$(OS) -kENGLISH -f "%s"..\h\usage.sp -o "%n%n%n%n%n%n%n%n%n%n" usage.h
# wsplice -f "$#define USAGE_LN_%$# (USAGE_BASE+%$#)%+" usage.h usage.h
# wsplice -f "%s%+"usage.h -o "$#define USAGE_LAST (USAGE_BASE+%$#)" usage.h
##############################################################################
# special case targets
isarray.gh : ./cretype.exe
$< > $@
./cretype.exe : cretype.c
$(bld_cl) $(wcl_util_opts) $[@
# dependencies on .h files
mglob.obj : isarray.gh .AUTODEPEND
##############################################################################
# symbolic targets
# print a list of unreferenced messages
chkmsg :
sed -f ../mif/msgdef.sed ../h/msg.h | sort -u >chkmsg.1
awk -f ../mif/msgref.awk chkmsg.1 >chkmsg.2
sed -f chkmsg.2 ../c/*.c | sort -u >chkmsg.3
comm -3 chkmsg.1 chkmsg.3 | tee chkmsg
rm chkmsg.?
strip : .symbolic
wstrip /q wmk.$(ext) wmks.$(ext) >nul
ls -l *.$(ext)
deps : .symbolic
cd ../c
../support/mmk >../mif/makedeps.mif
do : .symbolic
wmake -h -n | sed -f ../mif/mkdo.sed >do.bat
# In NT, failure of ..\regress\test does not set a failure return code.
test : $(xname).$(ext) .always .symbolic
..\regress\test $(%cwd)\$(xname).$(ext) # Works in NT, will fail in Linux
# ../regress/test $(%cwd)\$(xname).$(ext) # Fails in NT
# No Linux ../regress/test has been ported. W.Briscoe 2004-01-17
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -