Morton, John wrote:
Hopefully the manual also covers how to create GPC makefiles that use individually compile multiple source files, persistent object files and a separate user controllable linker step.
I don't think there's much about it in the manual.
- GPC has an "--automake" option that recursively invokes GPC to compile all modules. However, it has problems in tricky situations (involving cyclic dependencies), and does not support a user controllable linker step.
- The external GP utility (http://fjf.gnu.de/misc/gp.tar.bz2) is meant to replace automake, and will also call GPC for all modules and for linking. By default, linking is not user controllable. However, you can use the options "-c" (don't link) and "--print-objects", and then do what you need to with the objects. Also, the source of GP is written in Pascal, so you can modify it yourself if necessary (procedure Link might be the start to look at). If you make your changes in generally useful form (i.e., options, rather than hardcoding what you need), you can send the patch here, so I can integrate it (but, of course, you don't have to -- the GPL also allows making your own private changes).
- Of course, you can also hand-write a Makefile, C style. GP itself, in order to avoid a chicken-and-egg problem, contains such a Makefile (requires GNU make). It's probably more generalized than you need (including support for cross-compiling, support for Dos/Windows peculiarities, rules to build documentation, etc.), so you can probably do with something simpler.
Frank