
has /opt/mypackage/lib in it, which will then be able to handle both 32-bit and 64-bit
binaries that have linked against libmystuff.so.
Example 3-1: Directory Structure
/opt/mypackage/
include/
mystuff.h
lib/
i686/
libmystuff.a
libmystuff.so
x86_64/
libmystuff.a
libmystuff.so
If you have an existing p aradigm using different names, HP recommends introducing links with
the a bo ve names. An example of this is shown in Example 3-2.
Example 3-2: Recommended Directory Structure
/opt/mypackage/
include/
mystuff.h
lib/
32/
libmystuff.a
libmystuff.so
64/
libmystuff.a
libmystuff.so
....... i686 -> 32
....... x86_64 -> 64
Linking an application using the library (dy nam ic or archive) requires you to specify the
appropriate subdirecto ry, depending on wh ether the application is 32-bit or 64-bit.
For example, to build a 32-bit application, you might enter:
<linkcommand> <32-bit> -L/opt/mypackage/lib/i686 -lmystuff
To build a 64-bit application, you might enter:
<linkcommand> <64-bit> -L/opt/mypackage/lib/x86_64 -lmystuff
Note that there is no shortcut as there is for the dynamic loader.
3.9 Advanced To pics
This section discusses topics of an advanced nature pertaining to developing applications in
the HP XC environment.
3.9.1 Using the GNU Parallel Make Capability
By default, the make command invokes the GNU make program. GNU make has the ability to
make indepe nden t targets concurrently. For exam ple, if building a p ro gram requires compiling
10 so urce files, and the compilations can be done independently, make can manage multiple
compilations at once — the number of jobs is user selectable. More precisely, each target’s rules
are run normally (sequentially within the rule). Typically the rules for an object file target is a
3-10 Deve loping Applications
Commentaires sur ces manuels