1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META http-equiv="Content-Style-Type" content="text/css">
7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
8<title>makeinc.exe</title>
9</head>
10
11<body>
12
13<H1>makeinc.exe</H1>
14
15<H2>Location</H2>
16<p><code>$REVOLUTION_SDK_ROOT/X86/bin/</code></p>
17
18<H2>Overview</H2>
19<p>
20Creates a source file (<CODE>.inc</CODE>) for accessing a dynamic module from a static one using headers written in specified format.<br> Three functions, <code>ResolvedModule_</code><I>(specified label name)</I>, <code>UnresolvedModule_</code><I>(specified label name)</I>, and <code>unresolved_</code><I>(specified label name)</I>, will be output to the generated file (<CODE>.inc</CODE>).
21</p>
22
23<H2>Description</H2>
24<p>
25The target header should specify the functions and variables to be referenced by static module using <code>DLL_EXPORT</code> and <code>DLL_SYMBOL</code>.<br>Files set to <code>include</code> in the header will not be a target, so enumerate all headers.<br>In addition, code disabled using comments (<code>/* */</code> or <code>//</code>) will be visible, but code disabled using <code>#if</code> will not.
26</p>
27<p>
28Call <code>ResolvedModule_</code><I>(specified label name)</I> after linking the module and <code>UnresolvedModule_</code><I>(specified label name)</I> after unlinking the module.
29</p>
30<p>
31There is no planned C++ support for this tool.
32</p>
33
34<H2>Options</H2>
35<H3>-o &lt;Output File Name&gt;</H3>
36<p>
37Specifies the output file name.<br> When this is omitted, it will be output as <code>default.inc</code>.
38</p>
39<H3>-l &lt;Label Name&gt;</H3>
40<p>
41Specifies the label name portion of the generated functions.<br> When omitted, the label will be <code>default</code>, and in that case the function name will be <code>ResolvedModule_default</code>.<br>
42</p>
43<H3>@&lt;Response File&gt;</H3>
44<p>
45You can also configure and specify the arguments through a response file which lists the arguments.
46</p>
47<H2>Examples</H2>
48<p>
49This example generates the source file (<CODE>module.inc</CODE>) for accessing a dynamic module from a static one, using a header (<code>module.h</code>) written with <code>DLL_EXPORT</code> and <code>DLL_SYMBOL</code>.<br>In this example, the function name will be <code>ResolvedModule_module</code>.<br>
50
51</p>
52<TABLE border="1" width="95%">
53  <TBODY>
54    <TR>
55      <TD width="100%">
56      <PRE><CODE>
57% makeinc.exe -o module.inc -l module module.h
58</CODE></PRE>
59      </TD>
60    </TR>
61  </TBODY>
62</TABLE>
63<p>
64Use enumeration if multiple headers exist.
65</p>
66<TABLE border="1" width="95%">
67  <TBODY>
68    <TR>
69      <TD width="100%">
70      <PRE><CODE>
71% makeinc.exe -o module.inc -l module module0.h module1.h module2.h
72</CODE></PRE>
73      </TD>
74    </TR>
75  </TBODY>
76</TABLE>
77<p>
78If using a response file (<code>response.txt</code>), do so as follows:
79</p>
80<TABLE border="1" width="95%">
81  <TBODY>
82    <TR>
83      <TD width="100%">
84      <PRE><CODE>
85% makeinc.exe @response.txt
86</CODE></PRE>
87      </TD>
88    </TR>
89  </TBODY>
90</TABLE>
91<p>
92The <code>response.txt</code> example for the above.<br>
93</p>
94<TABLE border="1" width="95%">
95  <TBODY>
96    <TR>
97      <TD width="100%">
98      <PRE><CODE>
99-o module.inc -l module module0.h module1.h module2.h
100</CODE></PRE>
101      </TD>
102    </TR>
103  </TBODY>
104</TABLE>
105<p>
106This example shows how to write the header when you want the function <code>void foo(void)</code> and variable <code>int g_int</code> to be referenced by the static module.
107</p>
108<TABLE border="1" width="95%">
109  <TBODY>
110    <TR>
111      <TD width="100%">
112      <PRE><CODE>
113// For functions
114DLL_EXPORT      void     DLL_SYMBOL(foo)(void);
115// For variables
116DLL_EXPORT      int     DLL_SYMBOL(g_int);
117</CODE></PRE>
118      </TD>
119    </TR>
120  </TBODY>
121</TABLE>
122<p>
123This example shows how to use the header (<code>module.h</code>) written with <code>DLL_EXPORT</code> and <code>DLL_SYMBOL</code> within that module's source.
124</p>
125<TABLE border="1" width="95%">
126  <TBODY>
127    <TR>
128      <TD width="100%">
129      <PRE><CODE>
130#define DLL_EXPORT extern
131#define DLL_SYMBOL(s) s
132
133#include &quot;module.h&quot;
134
135#undef DLL_EXPORT
136#undef DLL_SYMBOL
137</CODE></PRE>
138      </TD>
139    </TR>
140  </TBODY>
141</TABLE>
142
143<p>
144This is an example of a file that stores the generated file (<code>module.inc</code>) using the static module.
145</p>
146<TABLE border="1" width="95%">
147  <TBODY>
148    <TR>
149      <TD width="100%">
150      <PRE><CODE>
151#define DLL_EXPORT
152#define DLL_SYMBOL(s) (*s)
153
154#include &quot;module.h&quot;
155
156#undef DLL_EXPORT
157#undef DLL_SYMBOL
158
159#include &quot;module.inc&quot;
160</CODE></PRE>
161      </TD>
162    </TR>
163  </TBODY>
164</TABLE>
165<p>
166This is an example for when the header (<code>module.h</code>) is being used by other static modules.
167</p>
168<TABLE border="1" width="95%">
169  <TBODY>
170    <TR>
171      <TD width="100%">
172      <PRE><CODE>
173#define DLL_EXPORT      extern
174#define DLL_SYMBOL(s)   (*s)
175
176#include &quot;module.h&quot;
177
178#undef DLL_EXPORT
179#undef DLL_SYMBOL
180</CODE></PRE>
181      </TD>
182    </TR>
183  </TBODY>
184</TABLE>
185
186<H2>See Also</H2>
187<p><a href="./tools.html">Tool List</a></p>
188
189<H2>Revision History</H2>
190<p>
1912006/10/27 Added support for response files.<br>2006/10/25 Added support for multiple files.<br> 2006/06/14 Initial version.<br>
192</p>
193
194<hr><p>CONFIDENTIAL</p></body>
195</HTML>
196