File: README.DYNMOD

package info (click to toggle)
hercules 3.07-2.2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 14,536 kB
  • sloc: ansic: 162,921; sh: 8,522; makefile: 784; perl: 202; sed: 16
file content (125 lines) | stat: -rw-r--r-- 4,444 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
-------------------------------------------------------------------------------

                       Hercules Dynamic Modules

                             (on Windows)

-------------------------------------------------------------------------------

                             Required Files


Required files:

  makefile:       "{modname}.msvc"    defines module name and source file(s)
  resource file:  "{modname}.rc"      the module's version resource file

-------------------------------------------------------------------------------

                            makefile stub format


Required makefile format:

    # Module name:

    DYNMOD = {modname}

    # Source files:

    DYNOBJ = \
        $(O){srcfile1}.obj \
        $(O){srcfile2}.obj \
        $(O){srcfile3}.obj
        ... etc...

  Your makefile is !INCLUDEd as part of Hercules's main makefile and
  thus your dynamic module gets built along with the rest of Hercules.

-------------------------------------------------------------------------------

                          The MAKE/BUILD command


Building (making):


    dynmake.bat {projdir} {modname} {build_type} {num_cpus} [-a|clean]

  e.g.:

   "X:\Hercules\dynmake.bat"  "$(SolutionDir)"  {modname}  RETAIL  32  -a


  The {projdir} value you pass MUST be a fully qualified path to your
  dynamic module's project directory where all of your files are. The
  dynamke.bat command you invoke should also be a fully qualifed path
  to the desired Hercules dynmake.bat file. The other arguments (i.e.
  {build_type}, {num_cpus}, etc) are identical to the values normally
  specified for the main Hercules "makefile.bat" command used to build
  Hercules with. Refer to makefile.bat for details.

-------------------------------------------------------------------------------

             Pre-Build event and Post-Build event callbacks


Optional files:

    prebuild.bat   Called before the main Hercules makefile.bat is called.
    postbld.bat    Called after  the main Hercules makefile.bat is called.

  During the build process, dynmake.bat checks if the file exists in your
  specified project directory and if it does, calls it with the following
  parameters:

        {hercdir}  {modname}  {build_type}  {num_cpus}  [-a|clean]

  The {hercdir} value is the fully qualified path the main Hercules source
  code directory. The other parameters are the same values that you passed
  to the dynmake.bat command.

-------------------------------------------------------------------------------

                            Resource Compiler


For your convenience the following #defines are also passed to the resource
compiler on the command-line during the actual build process:

    VERSION              The Hercules version string  (e.g. "3.06-svn-5602")
    TARGETFILENAME       Your module name string      (e.g. "{modname}.dll")
    MAX_CPU_ENGINES_STR  Number of CPUs as a string   (e.g. "32")

  Use them in your .rc resource file's VERSIONINFO structure as needed.

-------------------------------------------------------------------------------

                            The Build Process


Dynmake.bat first creates a work subdirectory beneath Hercules's main source
code directory using the same name as the {modname} you passed to it.

It then calls your prebuild.bat file if it exists. Use this callback to
perform any pre-build adjustments to your source files that may be necessary
before the actual build process begins.

When your prebuild.bat returns, it then copys all *.c, *.h, *.rc, *.rc2 and
*.msvc files from your project directory into its {modname} subdirectory and
invokes Hercules's primary "makefile.bat" script to perform the actual build.

When the build is done it then calls your postbld.bat callback if it exists.
You can use this callback to copy the resulting binary from Hercules's output
directory to your project directory or whatever other post-build processing
your product may require.

-------------------------------------------------------------------------------

                            More Information


For additional information regarding dynamic modules please see the "Hercules
Dynamic Loader" readme document called "README.HDL".

-------------------------------------------------------------------------------