PolicyFile = MicroStationPolicy.mki

appName  = ExportEngineerCE
sAppName = ExportEngineerCE

baseDir  = $(_MakeFilePath)
genSrc      = $(o)

%include mdl.mki

mdlLibs         = $(MSMDE)library/
abdLibs         = $(ABDSDK)library/

always:
    ~mkdir $(o)
    ~mkdir $(rscObjects)
    
dirToSearch = $(MSMDE)include/
%include cincapnd.mki

dirToSearch = $(o)
%include cincapnd.mki

#dirToSearch = $(ABDSDK)include/
#%include cincapnd.mki

DLM_NAME            = $(appName)
DLM_OBJECT_DEST     = $(o)
DLM_LIBDEF_SRC      = $(_MakefilePath)
DLM_DEST            = $(mdlapps)
DLM_NO_DLS          = 1
DLM_NO_DEF          = 1
DLM_NOENTRY         = 1
DLM_NO_SIGN         = 1
DLM_NO_MANIFEST     = 1

DLM_OBJECT_FILES = \
						$(o)$(appName)$(oext) \
						$(o)EngineerDialogHook$(oext) \
						$(o)ExportDoorHook$(oext) 

LINKER_LIBRARIES      = $(mdlLibs)bentley.lib \
                        $(mdlLibs)BentleyAllocator.lib \
                        $(mdlLibs)mdlbltin.lib \
                        $(mdlLibs)RmgrTools.lib \
                        $(mdlLibs)BentleyGeom.lib \
                        $(mdlLibs)DgnPlatform.lib \
                        $(mdlLibs)dgnview.lib \
						$(mdlLibs)ECObjects.lib
                        

#------------------------------------------------------------------------------
#   Compile source files
#------------------------------------------------------------------------------                        
$(DLM_OBJECT_DEST)$(tstdir)             : $(DLM_OBJECT_DEST)$(tstdir)

$(DLM_DEST)$(tstdir)                    : $(DLM_DEST)$(tstdir)

$(rscObjects)$(tstdir)                  : $(rscObjects)$(tstdir)

$(rscObjects)$(appName)cmd.rsc     : $(baseDir)$(appName)cmd.r

$(genSrc)$(appName)cmd.h           : $(baseDir)$(appName)cmd.r

$(o)$(appName).rsc : $(baseDir)$(appName).r

$(o)$(appName)typ.r : $(baseDir)$(appName)typ.mt

$(o)$(appName)typ.rsc : $(o)$(appName)typ.r

$(o)ExportDlg.rsc : $(baseDir)ExportDlg.r

$(o)ExportDoorDialog.rsc : $(baseDir)ExportDoorDialog.r
                        
$(o)$(appName)$(oext)           : $(baseDir)$(appName).cpp

$(o)$(appName)$(oext) : $(baseDir)$(appName).cpp

$(o)EngineerDialogHook$(oext) : $(baseDir)EngineerDialogHook.cpp

$(o)ExportDoorHook$(oext) : $(baseDir)ExportDoorHook.cpp


#------------------------------------------------------------------------------
#   Link the DLM
#------------------------------------------------------------------------------
%include dlmlink.mki

helloabdRscObjs = \
    				$(o)ExportDlg.rsc \
					$(o)$(appName)typ.rsc \
					$(o)$(appName)cmd.rsc \
					$(o)ExportDoorDialog.rsc

moreRscCompileOpts + -i$(basedir)

#------------------------------------------------------------------------------
#   Create the final .ma (that holds just resources)
#------------------------------------------------------------------------------
MA_NAME      = $(appName)
MA_DEST      = $(DLM_DEST)
MA_RSC_FILES = $(helloabdRscObjs)


#---------------------------------------------
#   Merge Objects into one file
#---------------------------------------------
$(DLM_DEST)$(MA_NAME).ma   : $(helloabdRscObjs)
    $(msg)
    >$(o)make.opt
    -o$@
    $(helloabdRscObjs)
    <
    $(RLibCmd) @$(o)make.opt
    ~time