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 source file (.inc) for accessing a dynamic module from a static one using headers written in specified format.<br>Three functions, <code>ResolvedModule_</code>(specified label name), <code>UnresolvedModule_</code>(specified label name), and <code>unresolved_</code>(specified label name), will be output to the generated file (.inc).
21</p>
22<H2>Description</H2>
23<p>
24The 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 heads.<br>In addition, code disabled using commenting (<code>/* */</code> or <code>//</code>) will be visible, but code disabled using <code>#if</code> cannot be seen.
25</p>
26<p>
27Call <code>ResolvedModule_</code>(specified label name) after creating the module link, and <br><code>UnresolvedModule_</code>(specified label name) after breaking the module link.
28</p>
29<p>
30There is no plan for C++ support for this tool.
31</p>
32<H2>Options</H2>
33<H3>-o (Output File Name)</H3>
34<p>
35Specifies the output file name.<br>When this is omitted, it will be output as <code>default.inc</code>.
36</p>
37<H3>-l (Label Name)</H3>
38<p>
39Specifies the label name portion of the generated function.<br>When omitted, the label will be <code>default</code>, and in that case the function name will be <code>ResolvedModule_default</code>.<br>
40</p>
41<H3>@&lt;Response File&gt;</H3>
42<p>
43The arguments can be configured through the response file listing the arguments.
44</p>
45<H2>Examples</H2>
46<p>
47This example generates a source file (.module.inc) for accessing a dynamic module from a static one using a header (<code>module.h</code>) written using <code>DLL_EXPORT</code> or <code>DLL_SYMBOL</code>.<br>In this example, the function name will be <code>ResolvedModule_module</code>.<br>
48
49</p>
50<TABLE border="1" width="100%">
51  <TBODY>
52    <TR>
53      <TD width="100%">
54      <PRE><CODE>
55% makeinc.exe -o module.inc -l module module.h
56</CODE></PRE>
57      </TD>
58    </TR>
59  </TBODY>
60</TABLE>
61<p>
62Use enumeration if multiple headers exist.
63</p>
64<TABLE border="1" width="100%">
65  <TBODY>
66    <TR>
67      <TD width="100%">
68      <PRE><CODE>
69% makeinc.exe -o module.inc -l module module0.h module1.h module2.h
70</CODE></PRE>
71      </TD>
72    </TR>
73  </TBODY>
74</TABLE>
75<p>
76Use the response file (<code>response.txt</code>) as follows:
77</p>
78<TABLE border="1" width="100%">
79  <TBODY>
80    <TR>
81      <TD width="100%">
82      <PRE><CODE>
83% makeinc.exe @response.txt
84</CODE></PRE>
85      </TD>
86    </TR>
87  </TBODY>
88</TABLE>
89<p>
90The <code>filelist.txt</code> example for the above:<br>
91</p>
92<TABLE border="1" width="100%">
93  <TBODY>
94    <TR>
95      <TD width="100%">
96      <PRE><CODE>
97-o module.inc -l module module0.h module1.h module2.h
98</CODE></PRE>
99      </TD>
100    </TR>
101  </TBODY>
102</TABLE>
103<p>
104This example shows how to write to the header when function <code>void foo(void)</code> and variable <code>int g_int</code> must be referenced by the static module.
105</p>
106<TABLE border="1" width="100%">
107  <TBODY>
108    <TR>
109      <TD width="100%">
110      <PRE><CODE>
111// for functions
112DLL_EXPORT      void     DLL_SYMBOL(foo)(void);
113// For variables
114DLL_EXPORT      int     DLL_SYMBOL(g_int);
115</CODE></PRE>
116      </TD>
117    </TR>
118  </TBODY>
119</TABLE>
120<p>
121This example shows how to use the header(<code>module.h</code>) written with <code>DLL_EXPORT</code> and <code>DLL_SYMBOL</code> with the module source.
122</p>
123<TABLE border="1" width="100%">
124  <TBODY>
125    <TR>
126      <TD width="100%">
127      <PRE><CODE>
128#define DLL_EXPORT extern
129#define DLL_SYMBOL(s) s
130
131#include &quot;module.h&quot;
132
133#undef DLL_EXPORT
134#undef DLL_SYMBOL
135</CODE></PRE>
136      </TD>
137    </TR>
138  </TBODY>
139</TABLE>
140
141<p>
142This is an example of a file that places the generated file (<code>module.inc</code>) using static module.
143</p>
144<TABLE border="1" width="100%">
145  <TBODY>
146    <TR>
147      <TD width="100%">
148      <PRE><CODE>
149#define DLL_EXPORT
150#define DLL_SYMBOL(s) (*s)
151
152#include &quot;module.h&quot;
153
154#undef DLL_EXPORT
155#undef DLL_SYMBOL
156
157#include &quot;module.inc&quot;
158</CODE></PRE>
159      </TD>
160    </TR>
161  </TBODY>
162</TABLE>
163<p>
164This is an example for when the header (<code>module.h</code>) is being used by other static modules.
165</p>
166<TABLE border="1" width="100%">
167  <TBODY>
168    <TR>
169      <TD width="100%">
170      <PRE><CODE>
171#define DLL_EXPORT      extern
172#define DLL_SYMBOL(s)   (*s)
173
174#include &quot;module.h&quot;
175
176#undef DLL_EXPORT
177#undef DLL_SYMBOL
178</CODE></PRE>
179      </TD>
180    </TR>
181  </TBODY>
182</TABLE>
183
184<H2>See Also</H2>
185<p><a href="./tools.html">Tool List</a></p>
186
187<H2>Revision History</H2>
188<p>
18906/14/2006 Initial version. <BR>10/25/2006 Added support for multiple files.<br> 10/27/2006 Added support for response files.<br>
190</p>
191<hr>
192<p align="right"><strong>CONFIDENTIAL</strong></p>
193
194</BODY>
195</HTML>
196