Configuring the FM SDK Environment

This section describes how to configure your FM SDK environment by setting environment variables. The FM SDK must be installed before proceeding with the instructions in this section. See the following sections for more information about FM SDK installation:

>Installing ProtectToolkit on Windows

>Installing ProtectToolkit on Unix/Linux

>Installing ProtectToolkit on Linux Manually

FM developers should ensure that their development environment is configured correctly and that all required files and library locations are set. This chapter is provided as a guideline for setting up the development environment so that required files can be accessed during the FM compile and link routines.

In order to be able to use the build scripts, the following environment variables are used:

>CPROVDIR: Specifies the installed location of the Cprov SDK (ProtectToolkit-C)

>FMDIR: Specifies the installed location of the FM SDK

Setting the Environment Variables

The environment variables are set using scripts.

To set the environment variables on Linux

1.Go to the ProtectToolkit software installation directory:

cd /opt/safenet/protecttoolkit5/ptk

2.Source the setvars.sh script:

/setvars.sh
To set the environment variables on Windows

1.Go to the ProtectToolkit FM SDK software installation directory:

cd <fmsdk_install_dir>\bin

2.Run the fmsdkvars.bat script:

/fmsdkvars.bat

Windows Environment Variable Paths

Please note that the Windows build scripts cannot handle space (“ ”) characters in the environment variables mentioned above. If the paths to the install locations contain a space in the directory name (e.g. C:\Program Files\SafeNet\Cprov SDK), you should use the short names of the directories that contain spaces (e.g. C:\Progra~1\SafeNet\CprovS~1). The short format of the directory names can be discovered using the ‘/x’ switch in a dir command. For example, you can use dir /x c:\progra* command to discover the short name of the “Program Files” directory.

NOTE   If you are using the provided FM SDK fmsdkvars.bat script, the paths are already converted to their short form.