Copy Prebuilt Binaries (Compact 7)
3/12/2014
Some BSP vendors distribute prebuilt binaries but do not publish the source code that they use to compile the binaries, often to protect intellectual property. Usually you find these binaries in the BSP in the <platform name>\Target subdirectories and <platform name>\Lib subdirectories. To include these libraries in the build, you must copy them to their respective subdirectories in %SG_OUTPUT_ROOT%\Platform\%_TGTPLAT%.
Note
For this example, we assume an audio codec.
To categorize your prebuilt binaries
In Platform Builder, create the following directories:
- Platform\%_TGTPLAT%\Prebuilt
- Platform\%_TGTPLAT%\Prebuilt\Codecs
Create the dirs file in the Platform\%_TGTPLAT%\Prebuilt\ directory and add
codecs
.Add the necessary filtering for
codecs
to the Prebuilt\dirs file.Edit the dirs file in Platform\%_TGTPLAT%\ and add
prebuilt
as the first entry in the file.For each subdirectory under Prebuilt, add the following files: sources, makefile, and Makefile.inc.
Each sources file needs only the following entries, so create the entry once and copy and paste it to the other sources files, as shown in the following example.
TARGETNAME=dummy TARGETTYPE=NOTARGET RELEASETYPE=PLATFORM WINCETARGETFILES=copy_files SOURCES =
Each makefile file needs only the default text
Makefile.def
. You can use a copy of an existing makefile file from the tree.Each Makefile.inc file must include copy rules for each of the binaries that you want to include in the image.
The copy files rules resemble those shown in the following example.
copy_files: copy *.lib $(_RELEASELIBDIR) copy *.pdb $(_RELEASELIBDIR) copy *.dll $(_RELEASEDIR) copy *.pdb $(_RELEASEDIR) copy *.rel $(_RELEASEDIR) copy *.map $(_RELEASEDIR)