📄 mdl.mki
字号:
#----------------------------------------------------------------------------
#
# Make Include File For Example Mdl Applications
#
# Note: define environment variable MS pointing to your MicroStation
# root directory.
#
# Current Revision:
# $RCSfile: mdl.mki,v $
# $Revision: 7.23 $ $Date: 1998/12/02 18:56:51 $
#
# Copyright 1985-94, Bentley Systems, Inc.
#
# Limited permission is hereby granted to reproduce and modify this
# copyrighted material provided that the resulting code is used only in
# conjunction with Bentley Systems products under the terms of the
# license agreement provided therein, and that this notice is retained
# in its entirety in any such reproduction or modification.
#
#----------------------------------------------------------------------------
#------------------------------------------------------------------------
# common include file for both mdl and java environments
#------------------------------------------------------------------------
%include common.mki
#----------------------------------------------------------------------------
#
# Define required macros, if they are not found from environment or cmd line
#
#----------------------------------------------------------------------------
%if !defined (__mdlMKI__)
__mdlMKI__ = 1
%endif
msg = |[== Building $@, ($=) ==]
#----------------------------------------------------------
# Define Default Source Directories
#----------------------------------------------------------
publishInc = $(MSMDE)mdl/include/
publishIdsInc = $(MSMDE)mdl/include/shareids/
stdlibInc = $(MSMDE)mdl/include/stdlib
mdlLibs = $(MSMDE)mdl/library/
rscDir = $(MSMDE)resource/
src = $(MSMDE)mdl/examples/
mdlexample = $(MSMDE)mdl/examples/
%if !defined (language)
language = english
%endif
%if !defined (langSpec)
langSpec = $(baseDir)$(language)/
%endif
#----------------------------------------------------------
# Define .dlo to resolve builtins
#----------------------------------------------------------
%if !defined (MLINK_STDLIB)
MLINK_STDLIB = $(mdlLibs)builtin.dlo
%endif
#----------------------------------------------------------
# Define Output Directories
#----------------------------------------------------------
mdlapps = $(MSJO)mdlapps/
o = $(MSJO)mdl/objects/
genSrc = $(MSJO)mdl/objects/
rscObjects = $(MSJO)mdl/rscobj/
reqdObjs = $(MSJO)mdl/reqdobjs/
#----------------------------------------------------------
# Define native code tools that are platform dependent
#----------------------------------------------------------
%if defined (unix)
%include unixmdl.mki
%elif defined (winNT)
%include winntmdl.mki
%endif
#----------------------------------------------------------
# Define tools commands common to all platforms
#----------------------------------------------------------
MCompCmd = $(toolsPath)mcomp
MLinkCmd = $(toolsPath)mlink
MLibCmd = $(toolsPath)mlib
RCompCmd = $(toolsPath)rcomp
RTypeCmd = $(toolsPath)rsctype
RLibCmd = $(toolsPath)rlib
dlmspecCmd = $(toolsPath)dlmspec
#----------------------------------------------------------
# Defaults for optional symbols
#----------------------------------------------------------
%if !defined (CCCompOpts)
CCCompOpts = $(CCompOpts)
%endif
%if PRG
compOpts = # don't need anything
linkOpts = -go # strip out debugging info
%elif defined (debug) || defined (MDLDEBUG)
compOpts = -g # add debugging info
linkOpts = -g # retain debugging info
%endif
#----------------------------------------------------------------------------
# Turn on optimizer
#----------------------------------------------------------------------------
%if defined (OPTIMIZATION)
compOpts + -O
%endif
%if defined (JIT)
compOpts + -j
%endif
#----------------------------------------------------------------------------
# Generate line number
#----------------------------------------------------------------------------
%if defined (LINE)
compOpts + -L
%endif
#----------------------------------------------------------------------------
# Generate full portable code
#----------------------------------------------------------------------------
%if defined (PORTABLE)
compOpts + -F
%endif
#----------------------------------------------------------------------------
# Turn on warnings for no ANSI function declarations by default
#----------------------------------------------------------------------------
%if !defined (NOSTRICT)
CompOpts + -r"defaultBuiltin error" \
-r"noAnsiDeclaration error" \
-r"undeclaredFunction error"
%else
CompOpts + -r"defaultBuiltin warn" \
-r"noAnsiDeclaration warn" \
-r"undeclaredFunction warn"
%endif
#----------------------------------------------------------------------------
# Define MakeProgram
#----------------------------------------------------------------------------
MakeProgram =% $(_bmake)
#----------------------------------------------------------------------------
# Inference Rules
#----------------------------------------------------------------------------
#----------------------------------------------------------
# Additional options for specific platforms
#----------------------------------------------------------
%if defined (x11Inc)
platformOpts + -i$(x11Inc)
%endif
%if defined (XWindow)
platformOpts + -dXWindow
%endif
#----------------------------------------------------------------------------
# Compiling MDL sources
#----------------------------------------------------------------------------
.(mc,m,c).mo:
$(msg)
> $(o)make.opt
-c
-o$@
-i${publishInc}
-i${publishIdsInc}
-i${stdlibInc}
%if defined (privateInc)
-i${privateInc}
%endif
-i${genSrc}
$(platformOpts)
$(altIncs)
$(compOpts)
$(moreMdlCompileOpts)
$<
<
$(MCompCmd) @$(o)make.opt
~time
#----------------------------------------------------------
# Creating executable from single MDL object file
#----------------------------------------------------------
.mo.ma:
$(msg)
> $(o)make.opt
-a$@
$(linkOpts) $&
<
$(MLinkCmd) @$(o)make.opt
~time
#----------------------------------------------------------
# Compiling resource source from type definition file
#----------------------------------------------------------
.mt.r:
$(msg)
> $(o)make.opt
-o$@
%if privateInc
-i${privateInc}
%endif
$(rscCompIncs)
$(altIncs)
-i${publishInc}
-i${publishIdsInc}
-i${stdlibInc}
$(platformOpts)
$(moreRTypeOpts)
$<
<
$(RTypeCmd) @$(o)make.opt
~time
#----------------------------------------------------------
# Compiling resource source files
#----------------------------------------------------------
.r.rsc:
$(msg)
> $(o)make.opt
$(rcompOpts)
-w
-o$@
%if privateInc
-i${privateInc}
%endif
$(rscCompIncs)
$(altIncs)
-i${publishInc}
-i${publishIdsInc}
%if langSpec
-i${langSpec}
%endif
%if debug
-dDEBUG
%endif
$(moreRscCompileOpts)
$(platformOpts)
-i${genSrc}
$<
<
$(RCompCmd) @$(o)make.opt
~time
#----------------------------------------------------------
# Creating include files from command table resources
#----------------------------------------------------------
.r.h:
$(msg)
> $(o)make.opt
-ho$@
-o$(o)$*.rsc
%if privateInc
-i${privateInc}
%endif
$(rcompOpts)
$(rscCompIncs)
$(altIncs)
-i${publishInc}
-i${publishIdsInc}
$(platformOpts)
$(moreRscCompileOpts)
$<
<
$(RCompCmd) @$(o)make.opt
~time
#----------------------------------------------------------
# Compiling DLM Specification files
#
# Under Windows NT, if $(moduleDef) is defined in the
# make file, dlmspec will generate a windows Module
# definition file named $(moduleDef) from your .dls file.
#----------------------------------------------------------
.dls.dlo:
$(msg)
> $(o)make.opt
-o$@
%if defined (winNT) || defined (rs6000) || defined (macintosh) || defined (os2)
-w$(moduleDef)
%endif
$<
<
$(dlmspecCmd) @$(o)make.opt
~time
#------------------------------------------------------------------------
# define a rule for creating .mc files from .c files
#------------------------------------------------------------------------
.c.mc:
$(copyCmd) $= $@
%if UNIX
$(makeFileWritable) $@
%endif
~time
.mc.c:
$(copyCmd) $= $@
%if UNIX
$(makeFileWritable) $@
%endif
~time
#----------------------------------------------------------------------
# Creating DLM .lib and .exp file from Module Def file (Windows NT only)
#----------------------------------------------------------------------
%if defined (winNT)
.def.lib:
$(msg)
$(CLibCmd) -out:$@ -def:$%$*.def -machine:$(ntCPU)
~time
%endif
#----------------------------------------------------------
# Override paths and rules for BSI internal use.
#----------------------------------------------------------
%if defined (BSI) && !defined (NO_INTERNAL_MODS)
%include bsimdl.mki
%endif
#----------------------------------------------------------
# End
#----------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -