makeinc.exe

Location

$REVOLUTION_SDK_ROOT/X86/bin/

Overview

Creates source file (.inc) for accessing a dynamic module from a static one using headers written in specified format.
Three functions, ResolvedModule_(specified label name), UnresolvedModule_(specified label name), and unresolved_(specified label name), will be output to the generated file (.inc).

Description

The target header should specify the functions and variables to be referenced by static module using DLL_EXPORT and DLL_SYMBOL.
Files set to include in the header will not be a target, so enumerate all heads.
In addition, code disabled using commenting (/* */ or //) will be visible, but code disabled using #if cannot be seen.

Call ResolvedModule_(specified label name) after creating the module link, and
UnresolvedModule_(specified label name) after breaking the module link.

There is no plan for C++ support for this tool.

Options

-o (Output File Name)

Specifies the output file name.
When this is omitted, it will be output as default.inc.

-l (Label Name)

Specifies the label name portion of the generated function.
When omitted, the label will be default, and in that case the function name will be ResolvedModule_default.

@<Response File>

The arguments can be configured through the response file listing the arguments.

Examples

This example generates a source file (.module.inc) for accessing a dynamic module from a static one using a header (module.h) written using DLL_EXPORT or DLL_SYMBOL.
In this example, the function name will be ResolvedModule_module.


% makeinc.exe -o module.inc -l module module.h

Use enumeration if multiple headers exist.


% makeinc.exe -o module.inc -l module module0.h module1.h module2.h 

Use the response file (response.txt) as follows:


% makeinc.exe @response.txt

The filelist.txt example for the above:


-o module.inc -l module module0.h module1.h module2.h 

This example shows how to write to the header when function void foo(void) and variable int g_int must be referenced by the static module.


// for functions
DLL_EXPORT      void     DLL_SYMBOL(foo)(void);
// For variables
DLL_EXPORT      int     DLL_SYMBOL(g_int);

This example shows how to use the header(module.h) written with DLL_EXPORT and DLL_SYMBOL with the module source.


#define DLL_EXPORT extern
#define DLL_SYMBOL(s) s

#include "module.h"

#undef DLL_EXPORT
#undef DLL_SYMBOL

This is an example of a file that places the generated file (module.inc) using static module.


#define DLL_EXPORT 
#define DLL_SYMBOL(s) (*s)

#include "module.h"

#undef DLL_EXPORT
#undef DLL_SYMBOL

#include "module.inc"        

This is an example for when the header (module.h) is being used by other static modules.


#define DLL_EXPORT      extern 
#define DLL_SYMBOL(s)   (*s)

#include "module.h"

#undef DLL_EXPORT
#undef DLL_SYMBOL 

See Also

Tool List

Revision History

06/14/2006 Initial version.
10/25/2006 Added support for multiple files.
10/27/2006 Added support for response files.


CONFIDENTIAL