Share via


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

  1. In Platform Builder, create the following directories:

    • Platform\%_TGTPLAT%\Prebuilt
    • Platform\%_TGTPLAT%\Prebuilt\Codecs
  2. Create the dirs file in the Platform\%_TGTPLAT%\Prebuilt\ directory and add codecs.

  3. Add the necessary filtering for codecs to the Prebuilt\dirs file.

  4. Edit the dirs file in Platform\%_TGTPLAT%\ and add prebuilt as the first entry in the file.

  5. For each subdirectory under Prebuilt, add the following files: sources, makefile, and Makefile.inc.

  6. 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 = 
    
  7. Each makefile file needs only the default text Makefile.def. You can use a copy of an existing makefile file from the tree.

  8. 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)
    

See Also

Concepts

Build Changes for BSPs