Build Procedure

How to Use the custom32.mak File?

The Makefile (custom32.mak), located in the SDK installation. at the following location, is used for building the following customized executables:

>Windows - ...\Samples\C\Customization

>UNIX - .../samples/c/customization

>Linux ARM - .../samples/c/customization

Sentinel RMS Component or Utility Windows UNIX Linux ARM
The License Manager lservnt.exe lserv lserv
The command-line license code generator lscgen.exe lscgen (Linux only) NA
The command-line license code decoder lsdecode.exe lsdecode lsdecode
The command-line upgrade license code generator ulscgen.exe ulscgen (Linux only) NA
The command-line upgrade license code decoder ulsdcod.exe ulsdcod ulsdcod
The command-line utility to obtain the system fingerprints echoid.exe echoid echoid
A Windows-based graphical utility to obtain the system fingerprints wechoid.exe NA NA
A vendor-specified extra layer of encryption used as a plug-in for wlscgen.exe wlscgen.dll* NA NA

* The Wlscgen.dll needs to be placed with Wlscgen.exe, so that the licenses generated by WlscGen will use the customized license encryption. Move Wlscgen.dll to the directory containing WlscGen.exe.

You have to fill up the value of following variables in the custom32.mak file:

RMS Component\Utility Windows UNIX Linux ARM
SRV_VENDOR_INIT_OBJS
Vendor's object file containing function definition for performing vendor-specific License Manager initialization and cleanup
VENDOR_INFO_OBJS
Vendor's object file containing function definition to set vendor specific License Manager ID string
LIC_INSTALL_POLICY_OBJS
Vendor's object file containing function definition for vendor specific license install/load policy
CHANGE_PORT_OBJS
Vendor's file containing function definition to modify the default port of License Manager
CHANGE_TFTP_PORT_OBJS
Vendor's file containing function to modify the default TFTP port of License Manager
NA NA
SERVER_HOOK_OBJS
Vendor's object file containing pre/post hook functions for request, update and release events.
TIME_TAMPER_OBJS
Vendor's object file containing function definition to configure/override default time tamper detection mechanism
ENCRYPT_LIC_OBJS
Vendor's object file containing function definition that adds an additional encryption layer for licenses
NA NA
DECRYPT_LIC_OBJS
Vendor's object file containing function definition for decryption of the encrypted layer
ENCRYPT_UPG_LIC_OBJS
Vendor's object file containing function definition that adds an additional layer of encryption while generating upgrade licenses
NA NA
DECRYPT_UPG_LIC_OBJS
Vendor's object file containing function definition for decryption of the encrypted layer
ENCRYPT_MSG_OBJS
Vendor's object file containing function definition that adds an additional layer of encryption for License Manager network communication.
DECRYPT_MSG_OBJS
Vendor's object file containing function definition for decryption of the encrypted layer.
CUSTOM_LOCK_OBJS
Vendor's object file containing function definition for vendor specified 4-byte custom locking
CUSTOM_EX_LOCK_OBJS
Vendor's object file containing function definition for vendor specified custom extended custom locking

The following tables depicts the relationship between the above-mentioned defines and the executables:

Defines in custom32.mak

Network

Standalone

SRV_VENDOR_INIT_OBJS

License Manager

The client application

VENDOR_INFO_OBJS

License Manager

NA

CHANGE_PORT_OBJS

>License Manager

>Client application

NA

LIC_INSTALL_POLICY_OBJS License Manager NA
CHANGE_TFTP_PORT_OBJS License Manager NA

SERVER_HOOK_OBJS

License Manager

NA

TIME_TAMPER_OBJS

License Manager

The client application

ENCRYPT_LIC_OBJS

DECRYPT_LIC_OBJS

>License Manager

>Command-line License Generator

>Command-line license code decoder

>wlscgen.dll

>Client application

>Command-line License Generator

>Command-line license code decoder

>wlscgen.dll

ENCRYPT_UPG_LIC_OBJS DECRYPT_UPG_LIC_OBJS

>License Manager

>Command-line Upgrade License Generator

>Command-line upgrade license code decoder

>Client application

>Command-line Upgrade License Generator

>Command-line upgrade license code decoder

ENCRYPT_MSG_OBJS DECRYPT_MSG_OBJS

>License Manager

>Client application

NA

CUSTOM_LOCK_OBJS

>License Manager

>Client Application

>Command-line utility to obtain the system fingerprints

>wechoid.exe

>Client Application

>Command-line utility to obtain the system fingerprints

>wechoid.exe

CUSTOM_EX_LOCK_OBJS

>License Manager

>Client Application

>Command-line utility to obtain the system fingerprints

>wechoid.exe

>Client Application

>Command-line utility to obtain the system fingerprints

>wechoid.exe

Based on the licensing mode, whether standalone or network, you need to rebuild your executables.

Standalone Licensing

If you want to build the samples provided with RMS, use the following command:

Windows

The command varies for different compilers supported in RMS. For example, in MSVS 2012, use the following command:

nmake -f custom32.MSVS2012.mak _V_SAMPLE_BUILD_=1 _V_STANDALONE_=1 all

UNIX [g]make -f custom32.mak _V_SAMPLE_BUILD_=1 _V_STANDALONE_=1 all
LINUX ARM

32-bit (soft float): [g]make -f custom32.mak _V_SAMPLE_BUILD_=1 _V_STANDALONE_=1 ARM32_FP=soft all

32-bit (hard float): [g]make -f custom32.mak _V_SAMPLE_BUILD_=1 _V_STANDALONE_=1 ARM32_FP=hard all

64-bit: [g]make -f custom64.mak _V_SAMPLE_BUILD_=1 _V_STANDALONE_=1 all

Network Licensing

If you want to build the samples provided with RMS, use the following command:

Windows

The command varies for different compilers supported in RMS. For example, in MSVS 2012, use the following command:

nmake -f custom32.MSVS2012.mak _V_SAMPLE_BUILD_=1 all

UNIX [g]make -f custom32.mak _V_SAMPLE_BUILD_=1 all
LINUX ARM

32-bit (soft float):[g]make -f custom32.mak _V_SAMPLE_BUILD_=1 ARM32_FP=soft all

32-bit (hard float):[g]make -f custom32.mak _V_SAMPLE_BUILD_=1 ARM32_FP=hard all

64-bit:[g]make -f custom64.mak _V_SAMPLE_BUILD_=1 all

This command will build all the required components based on the variables updated. For example, if you specified the value of TIME_TAMPER_OBJS as "tmtampcf.obj", issue the build command. This command will build only lservnt.exe.

In case if you want to build a particular component, then use the following command:

Windows nmake -f custom32.mak 'utility name'
UNIX [g]make -f custom32.mak 'utility name'
LINUX ARM

32-bit (soft float):[g]make -f custom32.mak ARM32_FP=soft 'utility name'

32-bit (hard float):[g]make -f custom32.mak ARM32_FP=hard 'utility name'

64-bit: [g]make -f custom64.mak 'utility name'

For example, if you want to build only echoid, then use the following command:

Windows nmake -f custom32.mak echoid.exe
UNIX [g]make -f custom32.mak echoid
LINUX ARM [g]make -f custom32.mak ARM32_FP=hard echoid

When and How to Rebuild the Client Application?

If you are using standalone licensing, your client application must be linked with the new object files before linking with the RMS licensing library. You do not need to build lservnt.exe.

If you are using network licensing, then you have to update your client application in following scenarios:

> An extra layer of encryption for communication between the client and the License Manager.

> Communication over a vendor-specified License Manager port.

> Vendor specified 4-byte custom fingerprint of a system.

> Vendor specified custom extended fingerprint of a system.

>Installation of Hooks on Pre/Post Request, Update and Release events

How to Build Your Client Application?

> Use the same object files that were used while generating the customized executables using the custom32.mak file.

>Add the object files to the link command of your application.

>If required, set the callback function using the available API functions. For example. in case of custom host ID, you need to call VLSsetHostIdFunc in client application. While in case of protection against time tampering, you do not need to call any function in the client application.

> Build the client application.