How to compile by MCC when the source has levels of folders?

803 views Asked by At

My Matlab source code (.m files) are stored in a hierarchical structure, which has a set of subfolders. I tried to compile them by the following commands in a CentOS server:

mcc -v -m a.m a_call_b.m -I ./Funs/*.m

But I have a lot of subfolders that I cannot list all of them in the command line. Is there any other way to compile the source files in a hierarchical structure?

1

There are 1 answers

1
sebastian On

I noticed this might do as well:

mcc -v -m a.m a_call_b.m -I ./Funs/*.m -a ./Funs

From the docs on the -a option:

If only a folder name is included with the -a option, the entire contents of that folder are added recursively to the CTF archive

So you'd only have to specify top-level directories of your application, which presumably are not too many to list.

See: http://www.mathworks.de/de/help/compiler/mcc.html