forked from fangq/iso2mesh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fallbackexeext.m
31 lines (30 loc) · 994 Bytes
/
fallbackexeext.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
function exesuff=fallbackexeext(exesuffix, exename)
%
% exesuff=fallbackexeext(exesuffix, exename)
%
% get the fallback external tool extension names for the current platform
%
% author: Qianqian Fang, <q.fang at neu.edu>
%
% input:
% exesuffix: the output executable suffix from getexeext
% exename: the executable name
%
% output:
% exesuff: file extension for iso2mesh tool binaries
%
% -- this function is part of iso2mesh toolbox (http://iso2mesh.sf.net)
%
exesuff=exesuffix;
if(strcmp(exesuff,'.mexa64') & exist([mcpath(exename) exesuff],'file')==0) % fall back to i386 linux
exesuff='.mexglx';
end
if(strcmp(exesuff,'.mexmaci64') & exist([mcpath(exename) exesuff],'file')==0) % fall back to i386 mac
exesuff='.mexmaci';
end
if(strcmp(exesuff,'.mexmaci') & exist([mcpath(exename) exesuff],'file')==0) % fall back to ppc mac
exesuff='.mexmac';
end
if(exist([mcpath(exename) exesuff],'file')==0) % fall back to OS native package
exesuff='';
end