The build system provided with the drivers is configured to compile the code
into both static and shared libraries for a x86 Linux host using GCC. The build system
is configured to use that platform by means of the x86.mak file, which consists of a set of variables that specify details
such as the toolchain to use, compilation flags, and the installation directory. The
design of the build system is such that it can easily be targeted to other platforms by
defining a custom makefile snippet with the details for the platform in question. The
top-level makefile can be directed to use a different platform when invoking the make
command:
make
PLATFORM=<customer_platform_file>.mak
This causes the x86.mak file to be
ignored and the specified file to be used instead. Additionally, the top-level makefile
can also pick up the PLATFORM if it is set as an environment variable. This provides a
convenient alternative to specifying it at the command line. If PLATFORM is defined both
as an environment variable and as a parameter to make
,
the latter takes precedence. Several of the variables defined in the makefile snippet
can be overridden with environment variables or at the command line, if so desired.