|
1 |
| -------------------------------------------------------------------------------- |
2 |
| -
|
3 |
| - Hercules Dynamic Modules |
4 |
| -
|
5 |
| - (on Windows) |
6 |
| -
|
7 |
| -------------------------------------------------------------------------------- |
8 |
| -
|
9 |
| - Required Files |
10 |
| -
|
11 |
| -
|
12 |
| -Required files: |
13 |
| -
|
14 |
| - makefile: "{modname}.msvc" defines module name and source file(s) |
15 |
| - resource file: "{modname}.rc" the module's version resource file |
16 |
| -
|
17 |
| -------------------------------------------------------------------------------- |
18 |
| -
|
19 |
| - makefile stub format |
20 |
| -
|
21 |
| -
|
22 |
| -Required makefile format: |
23 |
| -
|
24 |
| - # Module name: |
25 |
| -
|
26 |
| - DYNMOD = {modname} |
27 |
| -
|
28 |
| - # Source files: |
29 |
| -
|
30 |
| - DYNOBJ = \ |
31 |
| - $(O){srcfile1}.obj \ |
32 |
| - $(O){srcfile2}.obj \ |
33 |
| - $(O){srcfile3}.obj |
34 |
| - ... etc... |
35 |
| -
|
36 |
| - Your makefile is !INCLUDEd as part of Hercules's main makefile and |
37 |
| - thus your dynamic module gets built along with the rest of Hercules. |
38 |
| -
|
39 |
| -------------------------------------------------------------------------------- |
40 |
| -
|
41 |
| - The MAKE/BUILD command |
42 |
| -
|
43 |
| -
|
44 |
| -Building (making): |
45 |
| -
|
46 |
| -
|
47 |
| - dynmake.bat {projdir} {modname} {build_type} {num_cpus} [-a|clean] |
48 |
| -
|
49 |
| - e.g.: |
50 |
| -
|
51 |
| - "X:\Hercules\dynmake.bat" "$(SolutionDir)" {modname} RETAIL 32 -a |
52 |
| -
|
53 |
| -
|
54 |
| - The {projdir} value you pass MUST be a fully qualified path to your |
55 |
| - dynamic module's project directory where all of your files are. The |
56 |
| - dynamke.bat command you invoke should also be a fully qualifed path |
57 |
| - to the desired Hercules dynmake.bat file. The other arguments (i.e. |
58 |
| - {build_type}, {num_cpus}, etc) are identical to the values normally |
59 |
| - specified for the main Hercules "makefile.bat" command used to build |
60 |
| - Hercules with. Refer to makefile.bat for details. |
61 |
| -
|
62 |
| -------------------------------------------------------------------------------- |
63 |
| -
|
64 |
| - Pre-Build event and Post-Build event callbacks |
65 |
| -
|
66 |
| -
|
67 |
| -Optional files: |
68 |
| -
|
69 |
| - prebuild.bat Called before the main Hercules makefile.bat is called. |
70 |
| - postbld.bat Called after the main Hercules makefile.bat is called. |
71 |
| -
|
72 |
| - During the build process, dynmake.bat checks if the file exists in your |
73 |
| - specified project directory and if it does, calls it with the following |
74 |
| - parameters: |
75 |
| -
|
76 |
| - {hercdir} {modname} {build_type} {num_cpus} [-a|clean] |
77 |
| -
|
78 |
| - The {hercdir} value is the fully qualified path the main Hercules source |
79 |
| - code directory. The other parameters are the same values that you passed |
80 |
| - to the dynmake.bat command. |
81 |
| -
|
82 |
| -------------------------------------------------------------------------------- |
83 |
| -
|
84 |
| - Resource Compiler |
85 |
| -
|
86 |
| -
|
87 |
| -For your convenience the following #defines are also passed to the resource |
88 |
| -compiler on the command-line during the actual build process: |
89 |
| -
|
90 |
| - VERSION The Hercules version string (e.g. "3.06-svn-5602") |
91 |
| - TARGETFILENAME Your module name string (e.g. "{modname}.dll") |
92 |
| - MAX_CPU_ENGINES_STR Number of CPUs as a string (e.g. "32") |
93 |
| -
|
94 |
| - Use them in your .rc resource file's VERSIONINFO structure as needed. |
95 |
| -
|
96 |
| -------------------------------------------------------------------------------- |
97 |
| -
|
98 |
| - The Build Process |
99 |
| -
|
100 |
| -
|
101 |
| -Dynmake.bat first creates a work subdirectory beneath Hercules's main source |
102 |
| -code directory using the same name as the {modname} you passed to it. |
103 |
| -
|
104 |
| -It then calls your prebuild.bat file if it exists. Use this callback to |
105 |
| -perform any pre-build adjustments to your source files that may be necessary |
106 |
| -before the actual build process begins. |
107 |
| -
|
108 |
| -When your prebuild.bat returns, it then copys all *.c, *.h, *.rc, *.rc2 and |
109 |
| -*.msvc files from your project directory into its {modname} subdirectory and |
110 |
| -invokes Hercules's primary "makefile.bat" script to perform the actual build. |
111 |
| -
|
112 |
| -When the build is done it then calls your postbld.bat callback if it exists. |
113 |
| -You can use this callback to copy the resulting binary from Hercules's output |
114 |
| -directory to your project directory or whatever other post-build processing |
115 |
| -your product may require. |
116 |
| -
|
117 |
| -------------------------------------------------------------------------------- |
118 |
| -
|
119 |
| - More Information |
120 |
| -
|
121 |
| -
|
122 |
| -For additional information regarding dynamic modules please see the "Hercules |
123 |
| -Dynamic Loader" readme document called "README.HDL". |
124 |
| -
|
125 |
| -------------------------------------------------------------------------------- |
| 1 | +------------------------------------------------------------------------------- |
| 2 | + |
| 3 | + Hercules Dynamic Modules |
| 4 | + |
| 5 | + (on Windows) |
| 6 | + |
| 7 | +------------------------------------------------------------------------------- |
| 8 | + |
| 9 | + Required Files |
| 10 | + |
| 11 | + |
| 12 | +Required files: |
| 13 | + |
| 14 | + makefile: "{modname}.msvc" defines module name and source file(s) |
| 15 | + resource file: "{modname}.rc" the module's version resource file |
| 16 | + |
| 17 | +------------------------------------------------------------------------------- |
| 18 | + |
| 19 | + makefile stub format |
| 20 | + |
| 21 | + |
| 22 | +Required makefile format: |
| 23 | + |
| 24 | + # Module name: |
| 25 | + |
| 26 | + DYNMOD = {modname} |
| 27 | + |
| 28 | + # Source files: |
| 29 | + |
| 30 | + DYNOBJ = \ |
| 31 | + $(O){srcfile1}.obj \ |
| 32 | + $(O){srcfile2}.obj \ |
| 33 | + $(O){srcfile3}.obj |
| 34 | + ... etc... |
| 35 | + |
| 36 | + Your makefile is !INCLUDEd as part of Hercules's main makefile and |
| 37 | + thus your dynamic module gets built along with the rest of Hercules. |
| 38 | + |
| 39 | +------------------------------------------------------------------------------- |
| 40 | + |
| 41 | + The MAKE/BUILD command |
| 42 | + |
| 43 | + |
| 44 | +Building (making): |
| 45 | + |
| 46 | + |
| 47 | + dynmake.bat {projdir} {modname} {build_type} {num_cpus} [-a|clean] |
| 48 | + |
| 49 | + e.g.: |
| 50 | + |
| 51 | + "X:\Hercules\dynmake.bat" "$(SolutionDir)" {modname} RETAIL 32 -a |
| 52 | + |
| 53 | + |
| 54 | + The {projdir} value you pass MUST be a fully qualified path to your |
| 55 | + dynamic module's project directory where all of your files are. The |
| 56 | + dynamke.bat command you invoke should also be a fully qualifed path |
| 57 | + to the desired Hercules dynmake.bat file. The other arguments (i.e. |
| 58 | + {build_type}, {num_cpus}, etc) are identical to the values normally |
| 59 | + specified for the main Hercules "makefile.bat" command used to build |
| 60 | + Hercules with. Refer to makefile.bat for details. |
| 61 | + |
| 62 | +------------------------------------------------------------------------------- |
| 63 | + |
| 64 | + Pre-Build event and Post-Build event callbacks |
| 65 | + |
| 66 | + |
| 67 | +Optional files: |
| 68 | + |
| 69 | + prebuild.bat Called before the main Hercules makefile.bat is called. |
| 70 | + postbld.bat Called after the main Hercules makefile.bat is called. |
| 71 | + |
| 72 | + During the build process, dynmake.bat checks if the file exists in your |
| 73 | + specified project directory and if it does, calls it with the following |
| 74 | + parameters: |
| 75 | + |
| 76 | + {hercdir} {modname} {build_type} {num_cpus} [-a|clean] |
| 77 | + |
| 78 | + The {hercdir} value is the fully qualified path the main Hercules source |
| 79 | + code directory. The other parameters are the same values that you passed |
| 80 | + to the dynmake.bat command. |
| 81 | + |
| 82 | +------------------------------------------------------------------------------- |
| 83 | + |
| 84 | + Resource Compiler |
| 85 | + |
| 86 | + |
| 87 | +For your convenience the following #defines are also passed to the resource |
| 88 | +compiler on the command-line during the actual build process: |
| 89 | + |
| 90 | + VERSION The Hercules version string (e.g. "3.06-svn-5602") |
| 91 | + TARGETFILENAME Your module name string (e.g. "{modname}.dll") |
| 92 | + MAX_CPU_ENGINES_STR Number of CPUs as a string (e.g. "32") |
| 93 | + |
| 94 | + Use them in your .rc resource file's VERSIONINFO structure as needed. |
| 95 | + |
| 96 | +------------------------------------------------------------------------------- |
| 97 | + |
| 98 | + The Build Process |
| 99 | + |
| 100 | + |
| 101 | +Dynmake.bat first creates a work subdirectory beneath Hercules's main source |
| 102 | +code directory using the same name as the {modname} you passed to it. |
| 103 | + |
| 104 | +It then calls your prebuild.bat file if it exists. Use this callback to |
| 105 | +perform any pre-build adjustments to your source files that may be necessary |
| 106 | +before the actual build process begins. |
| 107 | + |
| 108 | +When your prebuild.bat returns, it then copys all *.c, *.h, *.rc, *.rc2 and |
| 109 | +*.msvc files from your project directory into its {modname} subdirectory and |
| 110 | +invokes Hercules's primary "makefile.bat" script to perform the actual build. |
| 111 | + |
| 112 | +When the build is done it then calls your postbld.bat callback if it exists. |
| 113 | +You can use this callback to copy the resulting binary from Hercules's output |
| 114 | +directory to your project directory or whatever other post-build processing |
| 115 | +your product may require. |
| 116 | + |
| 117 | +------------------------------------------------------------------------------- |
| 118 | + |
| 119 | + More Information |
| 120 | + |
| 121 | + |
| 122 | +For additional information regarding dynamic modules please see the "Hercules |
| 123 | +Dynamic Loader" readme document called "README.HDL". |
| 124 | + |
| 125 | +------------------------------------------------------------------------------- |
0 commit comments