ppumove is a program to make shared or static libraries from multiple units. It can be compared
with the tpumove program that comes with Turbo Pascal.
It should be distributed in binary form along with the compiler.
Its usage is very simple:
ppumove [options] unit1.ppu unit2.ppu ... unitn.ppu
|
Where options is a combination of
-
-b:
- If speci ed, ppumve will generate a batch le that will contain the external linking and
archiving commands that must be executed. The name of this batch le is pmove.sh
on linux, and pmove.bat otherwise.
-
-d xxx:
- If speci ed, the output les will put in the directory xxx
-
-e xxx:
- Sets the extension of the moved unit les to xxx. By default, this is .ppl. You don't
have to specify the dot.
-
-o xxx:
- sets the name of the output le, i.e. the name of the le containing all the
units. This parameter is mandatory when you use multiple les. On linux, ppumove
will prepend this name with lib if it isn't already there, and will add an extension
appropriate to the type of library.
-
-q:
- Causes ppumove to operate silently.
-
-s:
- Tells ppumove to make a static library instead of a dynamic one; By default a dynamic
library is made on linux.
-
-w:
- Tells ppumove that it is working under Windows NT. This will change the names of
te linker and archiving program to ldw and arw, respectively.
-
-h or -?:
- will display a short help.
The action of the ppumve program is as follows: It takes each of the unit les, and modi es it so
that the compile will know that it should look for the unit code in the library. The new unit les
will have an extension .ppu, this can be changed with the -e option. It will then put together all
the object les of the units into one library, static or dynamic, depending on the presence of the -s
option.
The name of this library must be set with the -o option. If needed, the pre x lib will be prepended
under linux.. The extension will be set to .a for static libraries, for shared libraries the extensions
are .so on linux, and .dll under Windows NT and os/2.
As an example, the following command
./ppumove -o both -e ppl ppu.ppu timer.ppu
|
under linux, will generate the following output:
PPU-Mover Version 0.99.7
Copyright (c) 1998 by the Free Pascal Development Team
Processing ppu.ppu... Done.
Processing timer.ppu... Done.
Linking timer.o ppu.o
Done.
|
And it will produce the following les:
- libboth.so : The shared library containing the code from ppu.o and timer.o. Under
Windows NT, this le would be called both.dll.
- timer.ppl : The unit le that tells the Free Pascal compiler to look for the timer code
in the library.
- ppu.ppl : The unit le that tells the Free Pascal compiler to look for the timer code in
the library.
You could then use or distribute the les libboth.so, timer.ppl and ppu.ppl.