Skip to main content

Indirect dependencies

For indirect dependencies, an mtb file for each library is automatically created in the libs directory. The version of each dependent library is also captured in the file assetlocks.json in the deps directory.

Once all the mtb files are in the application (both direct and indirect), the libraries they point to are pulled in from the specified Git repos and stored in the specified location (that is, mtb_shared for shared libraries and libs for local libraries). Finally, a file called mtb.mk is created in the application's libs directory. That file is what the build system uses to find all the libraries required by the application.

Since the libraries are all pulled in using make getlibs, you don't typically need to check them in to a revision control system - they can be recreated at any time by re-running make getlibs. This includes both shared libraries (in mtb_shared) and local libraries (in libs) - they all get pulled from GitHub when you run make getlibs.

You also don't need to check in the mtb files for indirect references and the mtb.mk file which are stored in the libs directory. In fact, the default .gitignore file in our code examples excludes the entire libs directory since you should not need to check in any files from that directory – they can be recreated at any time.

Last updated on