If you use our directory structure, you should use the
addvariant
command to create it. This section gives some examples of creating Makefiles for a single application, as well as
for a library and
an application.
A single application
Suppose we have a product (we'll use the archiver, lha for this example) that we'd like to make available on all the processors that the BlackBerry 10 OS supports. Unfortunately, we've been using our own custom Makefiles for gcc on x86, and we have no idea how to make binaries for other processors.
A library and an application
What if we want to distribute shared libraries (again for all the CPUs we can) and a development package as well? Let's use the bzip2 distribution as our example. The bzip2 binary already comes with BlackBerry 10 OS, but the library doesn't. You can download the source code from http://www.bzip.org.