# Make_VMT

## PURPOSE

MAKE_VMT is a Matlab native "make" file for distributing VMT

## SYNOPSIS

function Make_VMT

## DESCRIPTION

     MAKE_VMT is a Matlab native "make" file for distributing VMT
     Run this script to compile VMT on a local machine running Matlab. It will
     also copy all externals (i.e., doc, and background image)
     Assumes all components are in the present working directory.

     See also: mcc, copyfile, backup (FEX)

     Frank L. Engel, USGS, IL WSC

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

## SOURCE CODE

    0001 function Make_VMT
    0002 % MAKE_VMT is a Matlab native "make" file for distributing VMT
    0003 % Run this script to compile VMT on a local machine running Matlab. It will
    0004 % also copy all externals (i.e., doc, and background image)
    0005 % Assumes all components are in the present working directory.
    0006 %
    0007 % See also: mcc, copyfile, backup (FEX)
    0008 %
    0009 % Frank L. Engel, USGS, IL WSC
    0010
    0011 addpath utils
    0012 addpath tools
    0013
    0014 % Destination of EXE
    0015 % ------------------
    0016 [fname,pathname] = uiputfile('VMT.exe','Select where to asave VMT compiled executable');
    0017
    0018 [~, filename,ext] = fileparts(fname);
    0019
    0020 % Update documentation
    0021 % --------------------
    0022 if 0
    0023     sdir = pwd;
    0024     cd ..
    0025     m2html('mfiles','trunk', 'htmldir', [sdir filesep 'doc'], 'recursive','on','template','frame','index','menu');
    0026     cd (sdir)
    0027 end
    0028 % Command string
    0029 % --------------
    0030 com_str = ['-o ' ...
    0031     filename ...
    0032     ' -W WinMain -T link:exe -d ' ...
    0033     pathname...
    0034     ' -N -p map -p stats -p images -p utils -p doc -p tools -v '...
    0035     'VMT.m -a VMT.fig'];
    0036
    0037 % Compile
    0038 % -------
    0039 eval(['mcc ' com_str])
    0040
    0041 % Package documentation and externals
    0042 % -----------------------------------
    0043
    0044 % Background image
    0045 copyfile('VMT_Background.png',[pathname 'VMT_Background.png'])
    0046
    0047 % Documentation
    0048 backup([pwd filesep 'doc'],[pathname 'doc'],[],'/E /Y')
    0049
    0050 % Default colormaps
    0051 backup([pwd filesep 'cpt'],[pathname 'cpt'],[],'/E /Y')
    0052