0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 @echo off
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 rem msvc90freeopts.BAT
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3 rem
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 rem Compile and link options used for building MEX-files
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 rem using the Microsoft Visual C++ 2008 Express Edition compiler.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 rem
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 rem $Revision: 1.2 $ $Date: 2009/08/19 10:52:59 $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 rem
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 rem ********************************************************************
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 rem General parameters
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 rem ********************************************************************
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 set MATLAB=%MATLAB%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 set VS90COMNTOOLS=%VS90COMNTOOLS%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 set VSINSTALLDIR=%VS90COMNTOOLS%\..\..
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 set VCINSTALLDIR=%VSINSTALLDIR%\VC
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 set MSSdk=C:\Program Files\Microsoft SDKs\Windows\v6.1\
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 set LINKERDIR=%MSSdk%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 set MW_TARGET_ARCH=win64
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 set PATH=%VCINSTALLDIR%\BIN\amd64;%LINKERDIR%\bin\x64;%LINKERDIR%\bin\win64\x64;%LINKERDIR%\bin;%VSINSTALLDIR%\Common7\IDE;%VSINSTALLDIR%\SDK\v3.5\bin\amd64;%VSINSTALLDIR%\Common7\Tools;%VSINSTALLDIR%\Common7\Tools\bin;%VCINSTALLDIR%\VCPackages;%MATLAB_BIN%;%PATH%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20 set INCLUDE=%VCINSTALLDIR%\ATLMFC\INCLUDE;%VCINSTALLDIR%\INCLUDE;%LINKERDIR%\INCLUDE;%VSINSTALLDIR%\SDK\v3.5\include;%INCLUDE%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 set LIB=%VCINSTALLDIR%\ATLMFC\LIB\amd64;%VCINSTALLDIR%\LIB\amd64;%LINKERDIR%\Lib\x64;%VSINSTALLDIR%\SDK\v3.5\lib\amd64;%MATLAB%\extern\lib\%MW_TARGET_ARCH%;%LIB%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 rem ********************************************************************
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 rem Compiler parameters
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 rem ********************************************************************
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 set COMPILER=cl
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27 set COMPFLAGS=/c /Zp8 /GR /W3 /EHsc- /Zc:wchar_t- /DMATLAB_MEX_FILE
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 set OPTIMFLAGS=/MD /O2 /Oy- /DNDEBUG
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 set DEBUGFLAGS=/MD /Zi /Fd"%OUTDIR%%MEX_NAME%%MEX_EXT%.pdb"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 set NAME_OBJECT=/Fo
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32 rem ********************************************************************
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 rem Linker parameters
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34 rem ********************************************************************
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35 set LIBLOC=%MATLAB%\extern\lib\%MW_TARGET_ARCH%\microsoft
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36 set LINKER=link
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37 set LINKFLAGS=/dll /export:%ENTRYPOINT% /MAP /LIBPATH:"%LIBLOC%" libmx.lib libmex.lib libmat.lib /implib:%LIB_NAME%.x /MACHINE:X64 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38 set LINKOPTIMFLAGS=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 set LINKDEBUGFLAGS=/DEBUG /PDB:"%OUTDIR%%MEX_NAME%%MEX_EXT%.pdb"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40 set LINK_FILE=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 set LINK_LIB=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42 set NAME_OUTPUT=/out:"%OUTDIR%%MEX_NAME%%MEX_EXT%"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 set RSP_FILE_INDICATOR=@
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45 rem ********************************************************************
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46 rem Resource compiler parameters
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47 rem ********************************************************************
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48 set RC_COMPILER=rc /fo "%OUTDIR%mexversion.res"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 set RC_LINKER=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
51 set POSTLINK_CMDS=del "%OUTDIR%%MEX_NAME%.map"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
52 set POSTLINK_CMDS1=del %LIB_NAME%.x
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
53 set POSTLINK_CMDS2=mt -outputresource:"%OUTDIR%%MEX_NAME%%MEX_EXT%";2 -manifest "%OUTDIR%%MEX_NAME%%MEX_EXT%.manifest"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
54 set POSTLINK_CMDS3=del "%OUTDIR%%MEX_NAME%%MEX_EXT%.manifest"
|