makeinc.exe

Location

$REVOLUTION_SDK_ROOT/X86/bin/

Overview

Creates a 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 headers.
In addition, code disabled using comments (/* */ or //) will be visible, but code disabled using #if will not.

Call ResolvedModule_(specified label name) after linking the module and UnresolvedModule_(specified label name) after unlinking the module.

There is no planned 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 functions.
When omitted, the label will be default, and in that case the function name will be ResolvedModule_default.

@<Response File>

You can also configure and specify the arguments through a response file which lists the arguments.

Examples

This example generates the source file (module.inc) for accessing a dynamic module from a static one, using a header (module.h) written with DLL_EXPORT and 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 

If using a response file (response.txt), do so as follows:


% makeinc.exe @response.txt

The response.txt example for the above.


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

This example shows how to write the header when you want the function void foo(void) and variable int g_int to 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 within that module's 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 stores the generated file (module.inc) using the 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

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


CONFIDENTIAL